You may drive around or under a gate that is being lowered or raised at a railroad crossing:

Flashing red lights, lowered crossing gates, and/or bells at a railroad crossing mean that you must come to a complete stop. You must not go across the tracks until the lights and bells have stopped and the crossing gates are completely up. Do not drive around or under a gate that is moving up or down.

Wait, before you go

Ace Your New york DMV Written Test with our Guaranteed Cheat Sheet