According to this article it had many medicinal and perhaps magical uses, and was perhaps world more than the gold they brought.
“According to the Hebrew Bible, frankincense and myrrh were components of the holy incense ritually burned in Jerusalem’s sacred temples during ancient times. The ancient Greeks and Romans also imported massive amounts of the resins, which they burned as incense, used during cremations and took for a wide variety of ailments. By this time, medical practitioners had recognized and documented the substances’ antiseptic, anti-inflammatory and analgesic properties, prescribing them for everything from indigestion and chronic coughs to hemorrhoids and halitosis. According to Touwaide, myrrh appears with more frequency than any other plant substance in the writings of the Greek physician Hippocrates, who revolutionized the field of medicine in the fourth and third centuries B.C. The Roman historian and botanist Pliny the Elder, who recommended frankincense as an antidote to hemlock poisoning, wrote in the first century A.D. that the pricey dried sap had made the southern Arabians the richest people on earth.”
“At the time Jesus is thought to have been born, frankincense and myrrh may have been worth more than their weight in the third gift presented by the wise men: gold But despite their significance in the New Testament, the substances fell out of favor in Europe with the rise of Christianity and fall of the Roman Empire, which essentially obliterated the thriving trade routes that had developed over many centuries. In the early years of Christianity, incense was expressly forbidden because of its associations with pagan worship; later, however, some denominations, including the Catholic Church, would incorporate the burning of frankincense, myrrh and other aromatic items into specific rites.”