Place the gate within its sliding frame, and fully extend the gate from the frame so that it is at the point it will be when the gate is closed. Position the gate and its sliding frame against the fence so that the gate covers the opening. Adjust the positioning until the gate is evenly spaced next to the far end of the fence and is close enough for a latch to be installed.
Set a carpentry level on top of the gate, and check for straightness throughout the gate and sliding frame. Have an assistant hold the gate in place and back up to view the gate from all angles, comparing the line of the gate with the lines of the ground and the top of the fence. Reach a compromise between the various lines of installation and the reading of the carpentry level so that you have a gate that is fairly straight and also matches smoothly with its surroundings.
Mark the locations of each of the sliding frame attachment screw holes on the fence. Lower the gate and its sliding frame to the ground. Use a drill with a wood drill bit to drill out each of the marked holes, taking care not to go all the way through the fence wood.
Reposition the gate and sliding gate frame against the fence. Set 2-inch galvanized screws and galvanized washers into the sliding gate frame holes and into the holes drilled in the frame. Tighten each of the screws until the gate frame is securely attached to the fence. Test the sliding operation of the gate and make any necessary adjustments until the operation is smooth.
Open the gate fully and set a galvanized gate latch against the gate and the other side of the fence. Drill out each of the screw attachment holes and fasten the latch to both the gate and the fence with 2-inch galvanized wood screws.