The pavelow (9 kills), chopper gunner and ac-130 (11 kills) have flares to avoid missiles. But the pavelow and chopper gunner have only 1 (so two shots is usually enough), while the ac-130 has 2. Since you only get 2 rockets max, it's very hard to shoot down an ac-130 by yourself. You'd need to get yourself killed immediately after firing your second missile and then hope you don't spawn somewhere without cover cause then you won't even be able to shoot another missile. Also, if you wait too long, it will have reloaded its flares and it will have another 2... With an ac-130 in the air your only hope is that a teammate has a stinger missile too.
My advice is to always have at least one class with the cold blooded perk (so that you're not visible as a red square for the enemy) and a stinger to take down chopper gunners etc as soon as possible. 9 out of 10 times, if you leave a chopper gunner in the air without shooting it down, you'll have a nuke on your ass quite soon afterwards.