Build your gate so that it opens into the pen. That way when it closes, it will rest against a board you screw to the latch post. Then you are not relying only on the latch to keep the weight of a big ol' hog from opening your gate, and ruining your garden/day. I would use some heavy duty hinges, and and attach them to the other post with bolts. Get a spring that will shut the gate behind you too. Needless to say, build a solid gate with screws (not nails). Nails will fail a lot sooner than screws.