The custom was that no one could ever approach a king without bringing a gift. Gold, king of metals, was the perfect gift for the king of man. Frankincense is the gift for a priest. The function of a priest was to open the way to God for men. Jesus is the only way to the presence of God.
Myrrh is the gift for one who is to die.
One use of myrrh was to embalm the bodies of the dead. Jesus came into this world to live for men, and in the end, to die for men. He came to give for men His life and His death. Gold for a king, frankincense for a priest, myrrh for one who was to die - these were the gifts of the wise men. Even at the cradle of Christ, they foretold that He was to be the true King, the perfect High Priest, and in the end the supreme Savior of men.