gallery (n.) Look up gallery at Dictionary.com
c.1500, from Middle French galerie "a long portico" (14c.), from Medieval Latin galeria, of uncertain origin, perhaps an alteration of galilea "church porch," which is probably from Latin Galilaea "Galilee," the northernmost region of Palestine (see Galilee); church porches sometimes were so called from being at the far end of the church.
Super altare Beatæ Mariæ in occidentali porte ejusdem ecclesiæ quæ Galilæ a vocatur. [c.1186 charter in "Durham Cathedral"]
Sense of "building to house art" first recorded 1590s; that of "people who occupy a (theater) gallery" (contrasted with "gentlemen of the pit") first by Lovelace, 1640s, hence to play to the gallery (1867).