noun
crossing gate; barrier
A mechanical barrier that blocks passage, typically at railway crossings, toll booths, or parking lot entrances/exits.
踏切の遮断機が下りているので、電車が来るまで待ちましょう。
The railway crossing gate is down, so let's wait until the train passes.
駐車場の遮断機が開かなくて困
I had trouble because the parking lot barrier wouldn't open.
バー is a general loanword for a bar or rod, often used for simpler barriers; 遮断機 implies a more substantial mechanical gate.
Compound of 遮断 (interruption, blocking) + 機 (machine, device). The exact historical origin is uncertain, but the word is a straightforward modern technical compound.