Drill pilot holes to mount the baby gate's hinge bar in the wall at the top of the stairs. Consult the user's manual to determine how many holes to drill and their exact placement; this varies from model to model.
Hold the hinge bar against the wall so that it is at a 90-degree angle with the floor. The screw holes should be aligned over the pilot holes. Secure the hinge bar in place with screws.
Install the baby gate's latch bar the same way you installed the hinge bar, but on the opposite side of the wall from the hinge bar. The latch bar must be the same distance from the floor as the hinge bar.
Hang the baby gate on the hinge bar, ensuring it is no more than 3 inches from the floor. Secure the gate in place with the hinge cap.
Snap the swing control clip in place near the bottom of the latch bar. This prevents the gate from swinging in the wrong direction and causing injury.
Adjust the width of the baby gate to fit its location. Consult the user's manual to determine how to do this on your model.