The title of the story refers to the three "wise men" or magi who are supposed to have come bringing precious gifts to present to Jesus at his birth.
O. Henry used this title because of the idea of precious gifts and the idea of wisdom that the title alludes to. Jim and Della are trying to give each other what they think are the most precious gifts they can possibly come up with. Unwittingly, they give each other an even more precious gift -- the proof of the depth of their love for one another. As O Henry says at the end of the story, their gifts, and their reaction to those gifts, shows that they are truly wise.
So -- the title alludes to a story of wisdom and precious gifts. O Henry's story is about these same things.
"The Gift of the Magi" uses the symbolism of the three wise men who visit the Christ child bearing gifts. In the same thought the representation in the title indicates to the reader that the Magi (wise men) visited Christ who Christians knew would one day be the ultimate sacrifice for mankind.
In the short story by O'Henry each person demonstrates their love for one another by sacraficing his own greatest posession. For Della, her beautifl hair, is sacraficed to buy her husband, Jim, a gift that will show him how much she loves him. Jim has one possession of value, a watch. He sacrifices the watch so that he can buy Della the gifts of the combs that she saw and had expressed a desire to have.
The concept of Christianity once again emerges in the final section of the story. It is the great act of love that has resulted in their sacrifices. The gift of the Magi, love.