The word “limbo” is not in Scripture, and it is not in the Catechism, either. It was never a dogma or doctrine of the Catholic Church. If anything, it was a theory or hypothesis of theology, technically called a theological conclusion or construct. Since baptism is necessary for salvation, the question arose as to what happens when good people die before ever being able to be baptized: are they damned to hell?
The Church fathers spoke of two limbos, limbus patrum (limbo of the fathers) and limbus parvulorum (limbo of infants). Both were places of natural happiness where souls went after death. Unbaptized adults who lived virtuous lives but died before the coming of Christ and the redemption of the human race would go to this limbo and await Good Friday to be saved. Adam and Eve, Abraham, Isaac, Jacob, David, Solomon, etc., would have gone to this place (sometimes called the hell of the dead).
Unbaptized infants who died in the Christian era would end up in limbo, a place of eternal natural happiness, but not heaven since baptism was necessary to enter there. This proposition maintained the doctrine of the necessity of baptism and the divine mercy and justice of God to reward, not punish, infants who died before being baptized.
The notion of baptism by desire was not well formulated until a little later. The current Catechism omits the word and the concept of limbo and prefers to talk about the universal salvific will of God, the doctrine of sufficient and efficacious grace, and the truth that God’s mercy and justice are never in conflict. If the unbaptized child would have been baptized had she lived long enough or would have wanted to have been baptized, for example, in the case of abortion or miscarriage, then many theologians propose that would be a baptism of desire either on the part of the parents or implicitly on the part of the child.