interesting question..
in this sense, gloss is actually a variant of the noun gloze, from L. glossa, a word needing explanation, hence later the explanation itself; and so a glossary is a collection of such glosses.

the other gloss is related to Dutch gloos, a gleaming, and Swiss glossa, to gleam; ultimately from MHG.

all credit to OED2.