Like fuze said, It is a gun (in my experience it has only ever been a single gun) that remains for some odd reason after the train arrives at a factory or facility.
The train arrives, stops, then dissappears , but leaves behind an unkillable and yes, invisible gun. (I see you said you tried to strafe it with no effect, I've tried using 1000lb bombs with no luck either.)
This gun stops firing when the train "respawns" at the begining of its resupply run.
Been this way for a LONG time, and I dont really know if HTC considers it a bug or a feature.