If you want to construct or modify a wood fence gate so that it can be locked like a regular door, there are several options. If you are constructing a new fence, use steel post construction for the gate. This gives longer life than wood and greater security. If you fit the gate to the wood fence and door, you can use locking hardware that fits right into the threshold. If you are modifying an existing wood fence, you may need to upgrade the gate to provide the proper material for secure locking.
If you are building a wood fence anew, this is the easiest way to install a mechanism that locks from both sides. Using a hybrid wood and metal construction is the strongest method, as you have the beauty of the wood undergirded with a solid metal foundation custom built to hold the locking hardware. Attach hardware that is very similar to what you use inside the home--locks that will either lock from either side with a key or a bolt that can be released from the interior. Virtually any kind of security bolt can be installed provided you plan ahead with regard to the threshold design.
Retrofit Existing Fence
This job can be tougher, as there are more variables. If you have a slat fence, or similar thinner construction, the transition to the gate fixture could be more difficult unless you are willing to use a wider gate assembly. If you are using wood posts at the threshold, consider changing to a metal construction to accommodate prefabricated locking mechanisms. In addition to easing the retrofit, you will get a more secure lock, as the wood is more susceptible to rot and wear. Consider replacing the door with a metal and wood combination. The advantages here are that you retain the beauty of the wood but get the benefits of the metal. The new gate will operate more reliably and lock more securely than its wood counterpart. Look for a gate and door product that is prefabricated and that will fit into your existing set-up. If aesthetic concerns are at the top of your list, stay with the wood, but have the gate expanded to double thickness to help when you go shopping for a cylinder for the lock. Also, if the threshold remains wood, a bolt-type lock gives a more positive latch.