I’m happy to assure you that the Catholic Church has never taught that unbaptized babies go to hell. In fact, such a belief was explicitly rejected by Pope Pius VI in 1794, in response to the severe teachings of an group in Italy called the Jansenists.
The fate of unbaptized babies after death has been, however, a topic of discussion in the Church since at least the 4th century. The discussion centered around how to interpret Jesus’ words in the gospel of John (3:5) “no one can enter the kingdom of God without being born of water and the Spirit.”
Whether these words of Jesus applied to babies was apparently not a concern for the earliest Christians, since they baptized only adults. The practice of baptizing children only gradually entered the church’s life. But once it was established, Christians were faced with the question of how to reconcile Jesus’ words in the gospel of John with the fact that some babies, who were obviously innocent of personal sin, died before being baptized.
St. Augustine in the 4th century developed the idea that every human being upon birth was marked by the “original sin” of Adam and Eve. Augustine thought that unbaptized babies might suffer a milder form of hell, without intense punishment. Augustine’s concept of original sin became the teaching of the church, but his theory about its consequences to unbaptized babies was never adopted by the church as a whole.
This again became a topic of debate in the 12th century. St. Thomas Aquinas developed the theory that unbaptized babies would experience a place of natural happiness that would not, however, include a direct “vision” of God. He called this state of natural happiness “limbo.” The idea of “limbo” was never defined as an official Catholic teaching, although it was widely taught in the absence of a more compelling theory. Other theologians did propose other possibilities: for example, that the faith and love of the child’s parents would be sufficient for the babies to receive a “baptism of desire” and so go directly to a heavenly union with God.
The idea of limbo has fallen out of fashion among Catholics, and is no longer widely taught even as a theory. The present Catholic approach to this question is:
1. Death is the ultimate mystery, and no one has a blueprint as to what happens to any of us after we die.
but
2. We trust in God’s mercy. God is all-loving and the source of eternal life. The new “Catechism of the Catholic Church” (1261) states that “the great mercy of God who desires that all should be saved, and Jesus’ tenderness toward children which caused him to say ‘let the children come to me, do not hinder them’, allow us to hope that there is a way of salvation for children who die without baptism.”