Assess your equipment to determine the right width for the gate. Measure wide items such as a riding lawn mower and wheelbarrow. Add at least one foot to the width of your widest piece so you can go in and out of the gate comfortably.
Determine what size of posts you will need. A standard guide is to use 4-by-4 posts for a 4-foot gate, and 5-by-5 posts for a 6-foot gate. If you are creating a wide gate, use 6-by-6 posts to support the extra weight.
Use your width measurement to determine how far apart you will need to space the holes for the posts. If you're using 4-by-4 or 5-by-5 posts, dig the postholes 2 feet deep and 1 foot wide. Dig the hole 3 feet deep if you're using 6-by-6 posts.
Set the posts with cement and allow them to dry completely before attaching the gate. Check the width and adjust the position of the posts (if needed) so that the width matches your measurement.
Measure the width between the posts again once the cement is dry. Subtract one inch from the measurement to allow for hinges and latches. Use the final measurement as your width for the gate. For example, if the width from pole to pole is 32 inches, use 31 inches as the measurement for the gate.
Use 1-by-6 boards to create the frame for the gate. Mark and cut two boards to your specifications for the length, then mark and cut two boards to your specs for the width. Lay the pieces for the width in between the long boards for the length. Use a square to make sure the corners are square. Nail the boards together with 2 1/2-inch flat-head galvanized nails. Create a brace for the gate to run diagonally from corner-to-corner. Lay a piece of 2-by-3 board on top of the frame and trace cut lines. Saw the wood, following your cut lines. Lay the piece on top of nail it to the frame.
Flip the frame over to attach the fence slats (also referred to as pickets or vertical boards). Use enough 1-by-4 slats to meet your specifications for the size of the fence, and according to your choice of height (four, six or eight feet). Allow for an overhang on the top and bottom by centering the boards as you lay them on top of the frame. Keep the boards on the far left and far right flush against the edge of the frame. Space the other boards evenly, working from left to right. Adjust the spaces in between as needed. You may have to cut the last board, lengthwise to space it snugly and to keep the end boards flush.
Nail the vertical boards to the frame. Use a drill to screw hinges on the left post and left side of the gate. Attach the gate to the post. Add hardware for the gate latch on the right side of the gate.