It seems like what you need is an adjustment screw for both vertical and horizontal fit, on both ends. Then you can close the gate and useing screw/clamps adjust it to a perfect fit. I am skeptical that there is ANY foolproof way of getting it to stay lined up. Everything moves, plan on it moving and have the adjustment you need to get in into tolerance.
Pilot,
Good point you made there!
For the vertical shift the throw side of the swing gate clears this small apron and matches up with the 72 degree bias cut and also prevents the gate from swinging too far.

Also, the dead bolt latch prevents any horizontal movement once the bolt is thrown.

PUBLICATION ALERT!!!
Just got my July issue of That Other Magazine - the one that doesn’t sponsor this forum.
Check out the article, “Building a Model Railroad Gate,” by Fred Headon. I’m not going to give anything but a vague explanation (to keep from treading on anyone’s copyright toes,) but the problems of gate-top scenery, multi-level trackage on the gate, electrical protection (killing approach tracks) and bulletproof alignment are well and thoroughly explained.
I hesitate to publicize Kalmbach’s competition, but this one is worthy of a long, slow read (with notebook in hand.)
Chuck (modeling Central Japan in September, 1964 - planned gate eliminated by redesign)
I got a number of emails over the past week or so requesting that Part II be written up so in response I’ve spent the past few days cobbling it together. The completed web page for Part II of the tutorial on the swing gate is published on my PD web site.
One note to mention: The swing gate main construction will reach it’s first year of installation in March and so far I can say that it has held up nicely and I have not seen any need to make any adjustments or re-alignment.
The links for both tutorial installments are here:
Building a Swing Gate and alternative to the duckunder Part I
Building a Swing Gate and alternative to the duckunder Part II
Cheers,
Ryan
good to see that the gate has worked as well as you had hoped and without any problems. i`m sure this is because you kept it simple .
IMO many of the replies to your post have tended to make things more complicated than neccessary
i have a gate almost the same which has worked well for me for about 12 months and I find I don`t even have to use the bolt to hold it in place.
My swing gate is 4 feet long.
The only time it hangs on the hinges is when it is open.
When it is closed it rests on 2x4s on BOTH ends.
It doesn’t budge.
I need to build one. I can’t seem to find article with link. Newbie here
If you Google ‘swing gate for model railroad layout’, you will find lots of articles and YouTube videos.
Rich
Here’s one:
https://www.trains.com/mrr/beginners/ask-trains/how-do-i-build-a-layout-swing-gate/
And
https://cs.trains.com/mrr/f/11/t/292217.aspx
Simon
Come on guys, this thread is getting close to 20 years old!!!
Yeah, I missed that when I replied. That guy revived two ancient threads on Monday.
Rich
Yea, they got me on a DCC tread as their were two threads going at the same time asking the same question almost.
I love necroposting [8D]