When installing your fence, leave adequate space between two of your posts for a gate. The space should be large enough for your gate, hinges and a latch. Measure the width of your gate, and add an extra 2 inches to 3 inches to that measurement for proper spacing. Refer to the instructions included with your hinges and latch. Some hinges and latches may require additional spacing.
Attach the hinges to your gate, one near the gate's top and one near the bottom (just like the hinges on a door). Your hinge package should included all necessary screws. Use a power drill to drive the screws through the hinges and into the gate, securing them firmly into place.
Hold the gate in the spacing between your posts. Place some scrap blocks of wood under the gate. Hang the gate a few inches off of the ground to prevent it from dragging. Place a level along the top of the gate to make sure that it's sitting level between the posts. Adjust your blocks of wood if necessary.
With your gate in place, use a power drill to screw the hinges into your fence post. Drive the screws through the hinges and into the post to secure the gate to the post. Make sure that you insert all necessary screws into all sides of the hinges. Your gate should now be hanging on the post by the hinges. Test the installation by removing the wood blocks from under the gate.
Your latch should be separated into two pieces: a more a complex catching mechanism and a simple hook. Attach the catching mechanism to your other fence post, opposite your hinges. Use your power drill to screw the mechanism into place, about 50 inches up from the ground. This will ensure that small children cannot reach your latch.
Situate the hook on your gate, and align it with the catching mechanism. Use your power drill to screw the hook into the gate. The hook should be able to move freely into the catching mechanism when you close your gate.