Probably originally a compound of 目(me, “eye”) +金(kane, “metal”, in reference to the metal used in eyeglass frames). The kane changes to gane as an instance of rendaku (連濁). The spelling is based on an apparent borrowing from Chinese, see the gankyō reading below.
Probably a borrowing from written Chinese眼鏡/ 眼镜(yǎnjìng). Eyeglasses are first mentioned in Chinese in the 1400s as 靉靆/ 叆叇(aidai?), a transcription of an Arabic term. By the late Ming dynasty, eyeglasses appear in writing as 靉靆即眼鏡/ 叆叇即眼镜(“aidai, i.e. eye-lenses”), using the compound term 眼鏡/ 眼镜(yǎnjìng, literally “eye + lens”). Compare modern Min Nan reading gán-kiàⁿ.
This reading was mostly used by the military.[1] The standalone term gankyō may be somewhat archaic now.
Note that there are compounds that end in 眼鏡(gankyō) that appear to be derived from this term. However, Japanese sources parse these as deriving from other terms ending in 眼(gan, “eye”) that are then suffixed with 鏡(kyō, “lens”).
Cognate with mainland Japanese眼鏡(gankyō), ultimately deriving from written Chinese眼鏡/ 眼镜(yǎnjìng). Eyeglasses are first mentioned in Chinese in the 1400s as 靉靆/ 叆叇(aidai?), a transcription of an Arabic term. By the late Ming dynasty, eyeglasses appear in writing as 靉靆即眼鏡/ 叆叇即眼镜(“aidai, i.e. eye-lenses”), using the compound term 眼鏡/ 眼镜(yǎnjìng, literally “eye + lens”). Compare modern Min Nan reading gán-kiàⁿ.