There are several reasons to think that O. Henry is the narrator of his own story. One is that there is a great deal of authorial input. The author is commenting on his own story with interjections. For example:
There was clearly nothing to do but flop down on the shabby little couch and howl. So Della did it. Which instigates the moral reflection that life is made up of sobs, sniffles, and smiles, with sniffles predominating.
"The Gift of the Magi" is a Christmas story evidently intended to appear in the Christmas issue of a New York newspaper in the days when newspapers printed short stories on a regular basis, especially in their Sunday and holiday editions. O. Henry was a notoriously heavy drinker, said to consume two quarts of whiskey a day. He died at the early age of forty-seven of alcoholim-related diseases. He wrote many of his stories in saloons. The attentive reader will sense that O. Henry must have been half-drunk and writing this, his most famous story, under deadline pressure. He may have turned it in at the copy desk without proofreading it. He would have found that he repeated one bit of exposition several times.
ONE DOLLAR AND eighty-seven cents.
One dollar and eighty-seven cents. And the next day would be Christmas.
Tomorrow would be Christmas Day, and she had only $1.87 with which to buy Jim a present.
Only $1.87 to buy a present for Jim.
But what could I do—oh! what could I do with a dollar and eighty-seven cents?”
In addition to having to meet a deadline, O. Henry would have been required to fill up a certain amount of space with a minimum total number of words. He seems guilty of stretching his copy with the simple fact that Della had only $1.87 to buy her husband a Christmas present. His philosophical interjections would also help to stretch his story.
Another lapse which could be overlooked by many readers occurs near the end, when Jim returns home from work. Della feels sorry for him. She thinks:
Poor fellow, he was only twenty-two—and to be burdened with a family!
What family? Why wouldn't Della think "...to be burdened with a wife" if she were his only obligation? It seems that O. Henry was thinking of introducing the fact that Della is pregnant! That might be appropriate for a Christmas story because it would be a strong allusion to the story of the birth of Jesus on Christmas day about nineteen-hundred years ago. But O. Henry must have had second thoughts. He wrote for a mass audience. Many of his readers might have gotten the notion that he was suggesting that Della's baby (if he said she was pregnant) was the promised second coming of Christ, which many readers would consider sacrilege. The magi were not poor and did not give presents to each other. They were rich kings and could give the baby Jesus gifts of frankincense, gold and myrrh.
We can detect the workings of the author O. Henry's mind as he was writing "The Gift of the Magi." He might have written a somewhat different story if he had not been under the influence and under deadline pressure, probably writing in a noisy saloon on a cold winter night.