Maybe someone else will have a better answer than this, but here's what I think is going on.
Perhaps the major theme of this story is that Jim and Della are making sacrifices for one another because they love each other. They are willing to give up their most prized possessions for each other.
This idea of selfless love is one of the major ideas of Christianity. It is why Christ is said to have died to save humankind from its sins.
The number three has significance in Christianity and to the story of Jesus' birth. Three wise men (the Magi of the title) came to worship Jesus right after his birth. Jesus died as one of three who were crucified and he rose after three days. Three is the number of the persons of God in the Trinity.
So that's what I would say is going on -- it's a reference to Christianity.
The number three is also a recurring element in a fairy tale. (Incidentally, the numbers 5, 7, and 9 come up sporadically, too.) There are often three sisters, three wishes, three challenges, etc., in which two of these elements are often foils (elements to show contrast) for the third. Take, for example, the wicked step-sisters of Cinderella. Their ugliness, selfishness and outright meanness contrast with her gentle and noble nature.
In storytelling, this is just enough content to get the story going, develop the suspense until the crisis point, then make a resolution and denouement. This conveniently corresponds to a bedtime story, which lasts between five and ten minutes. However, I think the main point goes along with the first, since along with the element of three is the famous happily-ever-after ending, which is also a signal trait of the fairy tale. Such, at least, is the supposed destiny of Jim and Della.
We are told in the story (45) about the wise men bringing the gifts to the Babe in the manger. The three does not have to be used to tell us the same thing. It is already written out for us. I suggest investigating the number 187 (bc) and the number 13. Look into the pre-julius calendar days along with the root of magi being magic. Research the Roman consule preferably the Year of the Consulship of Lepidus and Flaminius. Look at the political system already in play and the calendars pre-written.
This story is actually anti Christmas saying that the sacrifice amongst Della and Jim are the "true" maji challenging Christianity which began what is known as the "New Testament". If you pay close attention when the narrator, which I believe reflects the beliefs of O. Henry. Read (34) and (45), he puts the sacrafice of Jim and Della above the maji, Queen Sheeba, and King Solomon. Calling their value low since it is based on substance but ornamental stemming from a monetary value.
There is so much to the numbers to even get into but as for the grey, grey grey....the line right after....Christmas Day.....He rhymed them on purpose to compare Christmas to grey.
Three: A Magic Number
In "The Gift of the Magi," the number three figures prominently. Consider the following:
- The story has three characters: Della, Jim, and Madame Sophronie.
- Della counts her money three times (Paragraph 1).
- The narrator says that "Life is made up of sobs, sniffles, and smiles (Paragraph 2).
- The story refers three times to the Youngs' supper entree: chops.
- The story mentions the Queen of Sheba, who gave three types of gifts to King Solomon: spices, gold, and jewels.
- A sentence in paragraph 5 says, "She stood by the window and looked out dully at a grey cat walking a grey fence in a grey backyard.”
- Jim tells Della, I don't think there's anything in the way of a haircut or a shave or a shampoo that could make me like my girl any less.
- The narrator alliteratively describes Della as speaking with "sudden serious sweetness."
- The were three magi: Balthasar, Melchior, and Gaspar.
- The magi offered three gifts: gold, frankincense, and myrrh.
- According to tradition, the magi were kings of Arabia, Persia, and India.
- The story centers on three valuables: Jim's gold watch, Della's hair, and the love Jim and Della share.