I monitor my two wooden gates with open/close sensors that have inputs for external contacts - works great
If I wanted to have a way to lock and unlock them I would look into using linear actuators and activate / deactivate them with rely contacts - that should work but I have not done it myself. You might also be able to somehow fit a standard z-wave door lock on the gate but that would take some work to get it to fit and they are not rated for use outside use.
For my open close sensors I just use old plastic bottles with a cable gland through the top. I have (in the past) used plastic project boxes but they are harder to waterproof.
I wish the HA industry would make for stuff that is water proof and more stuff for gates. Right now you have to MacGyver it