1590s, "continuous path around a fortification," from French corridor (16c.), from Italian corridore "a gallery or long passage in a building or between two buildings," etymologically "a runner," from correre "to run," from Latin currere "to run" (from PIE root *kers- "to run").
Original military sense in English now is obsolete. Meaning "outside gallery around the court of a building" is from 1640s; sense of "long hallway with rooms opening off it" is by 1814. Meaning "strip of territory of one state through another to give access," typically to the sea, is from 1919.