He had just bought the house, and the thing he wanted first was privacy — a way to close off the side of the property rather than leave an open run from the street down the side of the house to the back.
Standing in the passage it was obvious why it had not been done already. It is narrow, with the wall of the house on one side and the neighbour’s fence on the other. On the left the timber retaining wall carries posts, and those posts stand proud into the little width there is — so the real opening is not the gap between house and fence, it is the gap between house and post.
The second thing takes longer to see. The retaining wall was never built level, so the opening it forms is not square: the gap is a different width at the top from the bottom, and the ground under it is not flat either. A gate bought to a size would have been right along one edge and wrong along the other three.
There was one more problem, and it was the one that decides how the finished job looks. The fence ran across the opening at full height, and a gate of standard height would have left a strip of loose boards above it — a gate with offcuts over the top, which is what you see on a lot of side passages and what makes them look patched rather than built. So the boards above the opening came off first, and the opening was set out properly: one gate, full height, nothing above it.
From there it is ordinary carpentry done carefully. The frame was made to the opening that is actually there rather than the one it should have been, braced so it cannot drop out of square under its own weight, and hung to swing clear of the posts that caused the trouble in the first place.