The real gift is the love that Jim and Della have for each other.
Jim and Della were very poor, but each wanted to surprise the other with a meaningful gift for Christmas. This was because they believed that they could express their love for each other through material means. This was a mistake, but it’s the thought that counts.
Jim and Della ironically each tried to get their love something special by giving up the most meaningful possession they had. In Jim’s case, it was a watch. In Della’s case, it was her hair. Jim was shocked to come home to find Della’s short hair, because he had bought a gift for her hair.
"It's sold, I tell you--sold and gone, too. It's Christmas Eve, boy. Be good to me, for it went for you. Maybe the hairs of my head were numbered," she went on with sudden serious sweetness, "but nobody could ever count my love for you. Shall I put the chops on, Jim?"
Ironically, Della sold her hair to buy Jim an especially expensive watch band. She knew that his watch meant a lot to him, just like he knew how much her hair meant to her. He didn’t resent her cutting her hair, he was just surprised because it rendered his gift useless.
Useless does not mean meaningless. O’Henry comments on the beauty of the young couple’s selfless gifts, comparing them to the magi in the Christ story.
The magi, as you know, were wise men--wonderfully wise men--who brought gifts to the Babe in the manger. They invented the art of giving Christmas presents. Being wise, their gifts were no doubt wise ones, possibly bearing the privilege of exchange in case of duplication.
O’Henry refers to the Dillingham Youngs as “foolish children,” but the focus of the story is the irony of their gifts. They were as wise as they were foolish. They did not need to give up what they gave up to show their love, but in doing so, they gave each other a greater gift than anything material.