One of the ways in which O. Henry creates tension in "The Gift of the Magi" is by using what many story writers, including screen writers, call a "ticking clock." This means that the viewpoint character, who in this case is Della, has a problem which must be solved quickly. She must solve her problem quickly because tomorrow is Christmas. O. Henry actually states the same thing twice.
One dollar and eighty-seven cents. And the next day would be Christmas.
A few paragraphs later the author says almost exactly the same thing.
Tomorrow would be Christmas Day, and she had only $1.87 with which to buy Jim a present.
The whole story is told from Della's point of view. We share her problem and her anxiety. We share her feelings when she makes the rash decision to sell her beautiful hair. Then O. Henry preserves the tension--or even escalates it. Although Della has the money to buy Jim a nice present, now she is worried that he won't love her when he sees what she looks like without her gorgeous hair.
“If Jim doesn't kill me,” she said to herself, “before he takes a second look at me, he'll say I look like a Coney Island chorus girl. But what could I do—oh! what could I do with a dollar and eighty-seven cents?”
O. Henry was noted for his "surprise endings." In this story the reader is taken by surprise because he or she has been kept strictly in Della's point of view (POV) and has no idea that her husband Jim has been wrestling with a similar problem because of that "ticking clock." Tomorrow would be Christmas and he doesn't have the money to buy her the kind of present he would like to give her to show his love. When he tells Della he sold his treasured watch to buy her a set of combs for her now missing hair, the tension is finally resolved in a sad-happy ending. They have both sacrificed the things they prized the most, but they still have what is far more important in life: each other's love.
O. Henry had a great idea. This is probably his best-known and best-loved story. Della solves one problem and just creates another problem. She sells her hair, but then she has to worry about her husband's reaction. Women's long hair meant a lot to them in O. Henry's time. F. Scott Fitzgerald deals with a similar theme in his short story "Bernice Bobs Her Hair."