Measure the opening for which you are building the gate.
Cut pieces of 2-by-6 for the gate frame. If your gate opening is 80 inches wide and you want a gate that is 40 inches tall, you will need two pieces of 2-by-6 that are 77 inches long and two pieces that are 40 inches long.
Screw the four pieces of 2-by-6 together to create a rectangle with exterior dimensions of 80 by 40 inches. Use two 3-inch-long screws at each corner.
Install two more 2-by-6s that extend diagonally from corner to corner in the middle of the gate, creating an X pattern. This design will prevent the gate from sagging under its own weight. Lay a 2-by-6 diagonally from corner to corner and mark it where it crosses the corner. Cut it to length with a circular saw so that it fits inside the interior dimensions of the frame. Do the same with the second 2-by-6, cutting it into two pieces so that it fits in the diagonal spaces on each side of the first diagonal that you installed.
Sheathe the gate with vertical boards attached to the framework with 2-inch-long screws. Lay the frame down on a flat surface, then lay 1-inch-thick boards that are 41 inches long over the frame. Screw the boards onto the frame by putting four screws through each board: two screws each into the top and bottom rail. After all the boards are attached, trim them to the dimensions of the top and bottom rail using a circular saw.
Attach the gate to the post using two heavy duty hinges, one mounted four inches below the upper edge and the other four inches above the lower edge. Screw the hinges into the side of the gate using 3-inch-long screws. Hold the gate up to the post and screw the other sides of the hinges into the post using 3-inch long screws. Having someone to help you hold the gate up while you screw the hinges onto the post will be very helpful.
Keep the gate closed by installing a strong latch on the swinging side that connects to the post on the opposite side of the opening from the hinges.