You may drive around the gates at a railroad crossing:

You are required to stop at all railroad crossings when signals warn of an approaching train. These signals may include flashing red lights, a lowered crossing gate, a flagger signaling, or a train’s audible signal of warning. Do not attempt to go around a lowered gate.

Wait, before you go

Ace Your Pennsylvania DMV Written Test with our Guaranteed Cheat Sheet