According to the Holy Bible, the Magi were the three wise men, or three Esatern/Oriental Kings, who came gbearing gifts at Christ's birth. They are thus venerated and revered as special people, wise people, who traveled far and recognised Christ the Messiah when he was still a newborn babe. Their gifts were symbolic , too, and they presented themselves before Christ and his mother, Mary, with great adulation and humbleness and Love.
In essence, thus, LOVE is the key word here-- the key word in the adulation and worship that the Magi made, at the Birth of Christ-- an occasion that is forever marked as the 'Christmas' festival: a time for sharing, for loving, for giving gifts, for being humble and full of goodwill and compassion and humaneness.
In O Henry's story, we have two young people,Jim and Della, newly married, and just starting out in life. they are very poor and cannot afford many luxuries in life but are also full of hope and optimism for the future. And they are truly, deeply in Love with each other.
In this story, their Love and their 'Christmas spirit' is borne out by their mutual self-sacrifice-- the husband sells his watch to buy his beloved wife a lovely set of combs' the wife cuts off and sells her long and luxuriant hair to buy her husband a fob for his watch-- thus, they each give something they are very fond of, which is very precious to them, for the sake of the other. Neither stands to benefit, and ostensibly, there seems to be a vein of irony that theyve given gifts to each other (via their sacrifice/s) that are seemingly useless-- but the theme of the story is centered around Love and the special sentiments (as displayed by the Magi) that prevail at Christmas time. And ultimately, just by virtue of their action/s both young people are able to ratify their love and to show a true and sincere Christmas good will.
Thus, by virtue of sacrificing their most treasured possessions, to 'give' fully wholly to the other, by enhancing and elevating the occasion they--Jim and Della-- have emulated in the truest and most genuine sense, the example of the Magi who came to Christ the babe. Their 'gifts' are indeed akin to the Gift/s of the Magi; for, in the final analysis, as O Henry also tells us, the REAL GIFT of the Magi was te Gift of Love, which Della and Jim seem to also have in full measure. They are 'poor' only in material terms, not in spirit, and the richness and wealth of their sentiments are beyond measure.