Make a plan of your gate using graph paper. If the gate is small, a simple exterior frame might be strong enough. If the gate is large, at least one cross-brace is recommended. Many hardware stores and home improvement warehouses stock plans for common projects including gate-building; such plans are often free, and detail different designs for different purposes.
Use a tape to measure between the two uprights that are on either side of the space to be filled by the gate. Confirm that the space between them is the same at all points between the top and the bottom. Also measure the top-to-bottom distance. Transfer these measurements to your plan, subtracting a sufficient clearance gap to allow the gate to pass between the uprights when opening and closing. A 1-inch clearance gap, translating to a 1/2-inch gap on either side, is usually sufficient.
Build the gate using appropriate lumber. A locking gate needs to be sufficiently sturdy that it cannot simply be broken by an individual intent on breaking in. For most gates intended for home use, up to 6 feet tall and 4 feet wide, 2-inch-by-4-inch wood is adequate for the frame. With the wood oriented so that the wider face is laid parallel to the hinged end of the gate, the 4-inch orientation is sufficient to accommodate most mortise locks.
Use a power or hand saw to cut the frame members to size. Use hand-held course sandpaper to abrade any frayed timber away from the cuts to minimize the risk of splinters while working.
Lay out the cut-to-size frame members, in position, on a flat, level piece of ground; a paved driveway or path is ideal. Fix the members together using “L”-shaped metal support brackets at each joint; this creates a stronger gate than driving fasteners through one frame member into the next. Use wood-specific construction adhesive in the butt joins to increase strength and resiliency. Frequently recheck that the frame is square throughout the process, using a set square or an object you trust to have one corner exactly 90 degrees.
Allow the adhesive to fully dry and cure according to the manufacturer’s instructions. Lift the assembled gate frame into the space it is being built to fill, to confirm that it is the correct size. Place it back on the flat surface.
Cut to size the panel or planks that will form the cladding -- the main flat surface of the gate that fills the space -- and attach them to the “show” side of the frame while it is lying on the flat surface. Use fasteners intended for exterior use; deck screws are ideal for this purpose. Install a cross brace if the plans require one, aligning it so the bottom is at the hinge side.
Follow the manufacturer’s instructions to install the mortise lock. The process typically involves using a mortising jig to create the pocket in the upright frame member that will take the lock body; this pocket is the “mortise” from which the lock’s name is drawn. Make one hole from the front through to the back of the gate for the handle spindle, and another for the key holes. Secure the lock body in place and fit the gate furniture such as the handles and keyhole surrounds.
Create a matching receiver in the jamb -- the upright opposite the hinged side of the gate -- into which the lock’s sprung latch and locking bolt must fit, and secure the strike plate in place.