They have seen in each gift something which specially matched some characteristic of Jesus and His work. Gold is the gift for a king. William Barclay tells us in his commentaries that Seneca, an historian of Rome, records that in Parthia it was the custom that no one could ever approach the king without a gift. Gold, the king of metals, is the fit gift for a King of men. He was to rule over men's hearts, not from a throne, but from a Cross.
Frankincense is the gift for a priest.
It was in the Temple worship and at the Temple sacrifices that the sweet perfume of frankincense was used. The function of a priest is to open the way to God for men. The priest is the man who builds a bridge between men and God. That is what Jesus did. He opened the way to God.