DIY-ing a magnetic gate latch, for example ... Using screws, attach the piece of wood with the magnet to the top of your fence. Then, screw a washer on the gate of your fence, lining it up ...
So you need a fence gate, and you've started to think about hardware. Well, think carefully, because it can make or break your design.