The Gift of the Magi is an O. Henry short story in which a young couple are very much in love with each other but can barely afford their one-room apartment. For Christmas, they each make a sacrifice to purchase a gift for the other, with ironic results.
The moral of the story is that physical possessions, however valuable they may be, are of little value in the grand scheme of things. The true unselfish love that the characters, Jim and Della, share is greater than their possessions.
O. Henry ends the story by clarifying the metaphor between the characters in the story, Della and James (or Jim), and the Biblical Magi. The Gift of the Magi features O. Henry's characteristic twist ending and use of flowery diction.
(Summary adapted from Wikipedia.org)