Hmmm, well I use Darkwraith UI so I have additional ways of activating the AA gun to stock. I believe that in stock, as with the deck gun, you must look through you binoculars and press the space bar. Make sure the aircraft is within range of your guns and that it is occupied. If you want to fire the gun yourself just click on the gun (you must be in close proximity).
Please note that the best course of action to take is to crash dive immediately whilst turning hard, ideally diving below 30 meters, this will insure you keep the integrity of the hull intact so you can continue to pursue your primary objectives. I myself have only once fired the AA gun in anger just for the thrill of it. Well at least it beats Pope Benedict WW2 record of "not firing a single shot" during his time in an anti-aircraft battalion.
Good Hunting