The story alludes to the Bible most prominently in the final paragraph:
They were the first to give Christmas gifts. Being wise, their gifts were doubtless wise ones. And here I have told you the story of two children who were not wise.
The narrator is alluding to the Wise Men (the Magi) of the Bible, who brought gifts to the newborn Jesus because, seeing the Star of Bethlehem, they perceived that it heralded the birth of the King of the Jews. There are several important meanings to this allusion.
First, the Wise Men were not Jews themselves; the word magi was historically a term for followers of Zoroastrianism. Some accounts even consider them priests, or kings. The importance of this fact lies in the meaning of their visit to the infant Jesus; not necessarily as a sign of abandoning their own religion, but as a gesture of deep respect across lines of faith and nobility.
Second, the allusion implies that, being the first people to give Christmas gifts, the thought and purpose behind those gifts are at least as important as the gifts themselves. The reason and the way in which the magi gave their gifts is the true meaning, not the exact identity or the monetary value of the gift.
Della and Jim are unwise "children" because, in a sense, their actions were hasty, emotional and narrowly conceived; their sole intent was to please the other. The irony is, of course, that neither of them is able to enjoy their gift now, and they have both lost what was most valuable to them. To the modern, materialistic perspective, this might seem like a foolish arrangement. Yet, "they are the magi" because the purpose of their actions was pure, and indeed they did make each other happy by way of showing the lengths of self-sacrifice they were each willing to go to in order to exalt the other. As frustrated as they both might be, it seems difficult to imagine Jim and Della doing anything but growing closer after the events of this Christmas.
Jim and Della were two 'Children' who excelled the 'magi' by gifting beyond one's imagination. The art of gifting took a new meaning. Gifting is an art that needs novel ideas. The magi gifted Christ and the gifts didn't serve its purpose from Christ's perspective. The Biblical gifting is lauded because it is gifted to Christ and talking against it or criticising it IS blasphemous. But in closer observation one can judge the value of the gift must be of, at least, some use to the receiver. But neither Christ nor Jim nor Della benefitted from the gifts they received. The gifts by the magi or the gifts exchanged between Jim and Della were one and tha same. The gifts were useless.
But there is a difference between the gift of the magi and the gifts by Jim and Della. The magi gifted to fulfil a prophecy. So it is just a show. Those gifts were from their wealth. But these Children ' gifted their high valued possessions. The hair is her prized possession and Jim's , his prized possession. The magi showed their wealth whereas, 'the children' showed their love. So, 'the children ' excelled in the art of gifting.