In the final paragraph of "The Gift of the Magi," O. Henry refers to the original magi, the three wise men who "invented the art of giving Christmas presents." He contrasts the wisdom of these gift-givers with the folly of Jim and Della, "who most unwisely sacrificed for each other the greatest treasures of their house."
So far, the contrast between ancient wisdom and modern folly is straightforward, but O. Henry then complicates it. Jim and Della have been impractical in the gifts they chose and the sacrifices they made, but their folly contains a wisdom higher than prudence. Their love for one another, and their understanding that this is all that really matters, make them the magi, the wisest people of all.
The true significance of the story's title emerges in this point, and is highlighted by what appears to be a small detail. The title is not "The Gifts of the Magi" but "The Gift of the Magi." It refers, therefore, neither to the gold, frankincense and myrrh brought to the infant Jesus by the three wise men, nor to the combs and the watch-chain Jim and Della bought for one another. The gift which Jesus gave to the magi, and to the world, was love. It is this gift that Jim and Della give to one another, and without which any other gifts are meaningless.