Lay the gate on a flat surface. Mark the vertical portion of the gate frame where you intend to install the hinges. The hinges typically are installed at the levels of the horizontal rails. If the gate is especially heavy, install a third hinge between the upper and lower hinges, evenly spaced between them.
Place the hinges on the gate with the edge of the hinge plate aligned to the edge of the gate. Pass the tip of a pencil through each screw hole in the hinge plates to mark their positions on the gate. Remove the hinges. Drill pilot holes through each mark. Replace the hinges, aligning the screw holes with the pilot holes. Screw the hinges to the gate.
Place scrap lumber or bricks on the ground between the gate posts to hold the gate level and off the ground as you install the hinges. Gates typically are installed 2 to 4 inches off the ground. Position and center the gate between the gate posts with the unattached hinge plates flush against the gate post.
Lay a carpenter's level across the top gate rail. Adjust the position of the gate so it is level. Push shims, as needed, between the gate and supporting lumber or bricks to hold the gate level. Place the carpenter's level against a vertical rail of the gate frame. Adjust the position of the gate so it is plumb. Insert shims between the gate posts and gate to hold it in position. Make minor adjustments in the gate's position by tapping it with a mallet and inserting shims.
Mark the positions of the screw holes in the hinges on the corresponding gate post. Move the hinge plates out of your way. Drill pilot holes through the marks into the post. Reposition the hinge plates, then screw them to the gate post.