1825, "drawer or box where things are heaped together in a disorderly manner." The first element probably is a variant of Scottish glaur "to make muddy, dirty, defile" (Middle English glorien, mid-15c.), which is perhaps from Old Norse leir "mud." Hence, in nautical use, "a small room between decks," and, in mining, "large opening or pit." Meaning "opening through which the interior of a furnace may be seen and reached" (originally in glassblowing) is from 1849, probably from glory (n.), which had developed a sense of "circle or ring of light" by 1690s. Sexual (originally homosexual) sense from 1940s.