Yes, Assuming that you are able to mount both the lock, and the receiver on the gate as well as the pole. Look up some youtube videos on how it works and see if it will work in your scenario.
I have had a Ghost Controls brand opener on my driveway gate for about 4 years with no issues. they have a lock latch called the "Zombie Lock" that latches the gate at the end of it's closing cycle, and unlatches with opening. I have been very happy with the system. As long as your gate is...