Della and Jim are compared to the Magi at the very end of this richly ironic story. Although they have traded their most precious possessions to buy a gift for the other that is, in a sense, useless, as Della cannot use the combs without her hair and Jim cannot use the watch chain without his watch, the narrator argues that they are actually incredibly rich because of the love that they have for each other, as has been displayed in their willingness to sacrifice what is dearest to them for the other.
Note what the final paragraph tells us about them:
But in a last word to the wise of these days, let it be said that of all who give gifts, these two were the wisest. Of all who give and receive gifts, such as they are wisest. They are the Magi.
The Magi are normally held up as a symbol of the original spirit of Christmas gift-giving, and so by comparing Jim and Della to the Magi, O. Henry is arguing that in their choice of gifts, which the "wise" might consider to be "foolishness," they actually capture the original spirit of sacrificial gift-giving that we see in the story of the Magi. By holding their love for each other as more important than their own possessions, they show a true spirit of Christmas love that is a challenge to all of us when Christmas arrives in these materialistic times.