Measure out two positions for the post holes so that the holes have 49 inches between them. Dig each post hole 22 inches deep using a post hole digger, making the holes 8 inches in diameter. Add a 4-inch layer of gravel to the bottom of each hole. Plant a 4-by-4-by-58-inch post in each hole, and fill in the hole with cement. Allow the cement to dry overnight. This creates posts 40 inches tall from ground level.
Hold a treated 1-by-36-by-48-inch gate board up to the post with the help of an assistant and position the hinges in their best evenly spaced positions. Mark the location of the hinge screw holes on both the gate board and the posts.
Drill 1-inch holes into each marked location on the gate board and the posts. Attach the hinges to the gate board using 1-inch wood screws. Hold the gate board up to the post and attach the hinges tightly to the post using 1-inch wood screws.
Test the operation of the gate and make any necessary adjustments to the hinge position based on the smoothness of the gate's motion. Position the latch on the gate and the opposing post, and mark the location of the screw holes on the gate board and the post. Drill 1-inch holes into each marked location and attach the latch to both gate and post with 1-inch screws. Test the latch to ensure proper function and make any necessary adjustments.