Who were the 'magi'?
The word magi is the plural of magus, which means wise man or even sorcerer (the English word magic comes from the same roots). It is an Old Persian word that was taken into Greek. In the Gospel of Matthew, expanded by later Christian tradition, the magi were the Wise Men who made a long journey from the East, guided by the Star of Bethlehem, to worship the newborn baby Jesus as King of the Jews:
On coming to the house, they saw the child with his mother Mary, and they bowed down and worshipped him. Then they opened their treasures and presented him with gifts of gold and of incense and of myrrh. (Matthew 2)
The Bible nowhere says that there were three magi, but since there were three gifts, this number was assumed.
The magi thus symbolize wise and devoted figures who bring precious gifts in the face of great difficulty to themselves.
In the story, "The Gift of the Magi," the characters of Jim and Dehlia, the husband and wife in the story are representative of the Magi, described in the other two answers. O Henry uses this title particularly to highlight the uniquely sacrificial love that Jim and his wife share.
It is a rare occasion for self-sacrifice to dominate a relationship in the way the it does Jim and Dehlia's marriage. Their personal sacrifices made for each other, symbolize for O Henry the great love and respect that the Magi showed the infant Jesus. Like the Magi, who traveled far and with great risk to personal safety, Jim and his wife surrender their most valued personal possessions to buy gifts for the other.
The other is more important than the self in this story, that is at the heart of the theme, love, sacrifice, and an understanding of a greater gift that has nothing to do with material possessions.
the three kings
The word magi means holy sages from the Orient especially Persia. "Magi" is the plural of 'magus'.
In the New Testament the magi are the 'wise men' from the Orient who visited the infant Jesus and gave him costly gifts. Since there were three gifts it is traditionally believed that three 'wise men' visited Jesus.