When I lived at home for a summer, I needed a way to open our new gate because I did not have a clicker.
My solution was to use an Atmel ATMega 328p, some BJTs, a Xbee module to solve the problem.
Picture above is not the finished product, just the breadboard layout. I will try and add a picture of my proto board next time I see it.
The xbee connected to the home wifi. A very simple Androud app would sent a TCP packet to either open or close the gate. The signal would be relayed from the xbee over a 9600 baud serial line to the AVR, and then fire the BJT to complete the switch circuit.
As you may know BJTs are current controlled devices. I used them like switches here and it worked just fine. You just saturate the base with a voltage and the collector emitter current opens up. Fortunately a 5V GPIO from the AVR worked well enough to complete the gate switch circuit and open the gate.
Source is attached