A gallery was a hallway before it was a museum. The word comes from Old French galerie, meaning 'a long, covered walkway or portico', from Medieval Latin galeria. Its origin beyond that remains debated, but one intriguing theory connects it to galilaea — the name given to church porches in the Middle Ages.
Why Galilee? In Christian geography, Galilee was the remote northern province, far from the sacred centre of Jerusalem. A church's galilaea was its porch — the point farthest from the altar, where penitents and catechumens stood. The architectural term may have migrated from sacred to secular use.
The original gallery was a long passage in a grand house or palace. Such passages had long, blank walls — perfect for hanging paintings. By the 16th century, gallery had acquired its art-display meaning. The Uffizi Gallery in Florence and the Galerie des Glaces at Versailles are galleries in the original architectural sense: long corridors lined with art.
The theatrical gallery — an upper balcony — preserves the spatial meaning. In Elizabethan playhouses, the gallery was the tiered seating area above the pit. 'Playing to the gallery' meant projecting to the cheap seats, and the phrase has kept its connotation of crowd-pleasing ever since.
In mining, a gallery is a horizontal tunnel — a long passage underground. The architectural and geological meanings converge on the same shape: a narrow corridor extending into the distance.