If the gates at a railroad crossing are down and red lights are flashing, you should:

Stop at a railroad crossing when the warning lights start to flash and the gate lowers. Remain stopped until the gate is raised and the lights stop flashing. Never drive around lowered gates at a railroad crossing because it is against the law and very dangerous.
DMV Writen Test