When may you legally ride around or under a lowered railroad crossing gate?

If you come to a railroad crossing controlled by lowered gates or flashing lights, you must stop. Do not go around or under any lowered gate at a railroad crossing. Once the gate is raised, do not proceed across the tracks until you can see clearly in both directions and are sure there are no trains coming.