The words gum meaning "flesh around the teeth" and "sticky thing you chew" are not related. The former, through Middle English gome, comes from the Old English word for "palate", goma, which eventually traces to Proto-Germanic gaumo and Proto-Indo-European ghumo. The other kind of gum you get from a plant has a much more interesting origin. It was borrowed from an Anglo-Norman word also spelled gome, which derives from a Latin word spelled either as cummi or gummi. That in turn goes back to Ancient Greek kommi, still referring to the plant product, and ultimately is thought to be from the Egyptian word qmy, meaning "anointing oil". This obviously shifted in definition as the resin was traded around the Mediterranean and very likely hails from a Proto-Semitic root.
Hello! I'm Adam Aleksic. This year, I graduated from Harvard University with a degree in Government and Linguistics. There, I co-founded the Harvard Undergraduate Linguistics Society and wrote a thesis on Serbo-Croatian language policy, magna cum laude. In addition to etymology, I also really enjoy philosophy, trivia, vexillology, geography, board games, conlanging, art history, and law.