"a precious stone" (especially when cut or polished), c. 1300, probably from Old French gemme (12c.), from Latin gemma "precious stone, jewel," originally "bud," from Proto-Italic *gebma- "bud, sprout," from PIE *geb-m- "sprout, bud" (source also of Lithuanian žembėti "to germinate, sprout," Old Church Slavonic prozebnoti "to germinate").
The two competing traditional etymologies trace it either to the root *gembh- "tooth, nail" [Watkins] or *gem- "'to press." De Vaan finds the second "semantically unconvincing" and leans toward the first despite the difficult sense connection.
Of persons, "a rare or excellent example (of something)" from late 13c. Alternative forms iemme, gimme persisted into 14c. and might represent a survival of Old English gimm "precious stone, gem, jewel," also "eye," which was borrowed directly from Latin gemma.