The commentary on the sMra sgo (most probably by Rong-zom-pa) explains gal te na. See the Rong zom gsung ’bum (vol. 2, p. 451). If I understand correctly, gal te na seems to be explained as gang la ci zhig na (“in something somewhere/somehow”) meaning “provided/given” (preposition). That is, gal is a contraction of gang la. The text reads lar instead of la but I wonder if the reading is correct. And ci zhig has been elided (or rather substituted with te). According to Si-tu-paṇ-chen, the sMra sgo and its commentary have proposed that gal is contracted from gang la, te na from ste na, and ste na from ci zhig na. Some Tibetan scholars have criticised this etymology but Si-tu-paṇ-chen seems to (partially) endorse it. See his Mu tig phreng mdzes (p. 246).
Dan Martin has made some insightful remarks in an old blog, which I reproduce here verbatim:
“Tibetanists usually just accept the gal te as having a syntactical use in the sentence, but not as a word with meaning of its own. It’s only used in this particular clause formation. It marks the onset of a conditional clause, just as the na marks the end of the same, but the na alone is perfectly capable of working on its own without any help from the gal te.
I’ve heard some speculation about the original meaning of gal te, that it's some archaic construction that got frozen in place as an adverbial form until it was no longer understood in its original meaning. That seems to be true as far as I know. I imagine its meaning would have been something like ‘contrarily’ (taking it as related to the non-archaic verb ’gal ba that has this kind of meaning). Any other ideas out there?”