Our first daughter lived only 20 hours. One of the nurses told me she baptized her, but I don’t know if the nurse was Catholic or not. Was my daughter’s baptism valid, and is she in heaven now?
The Catechism of the Catholic Church states,
In case of necessity, anyone, even a non-baptized person, with the required intention, can baptize, by using the trinitarian baptismal formula. The intention required is to will to do what the Church does when she baptizes. The Church finds the reason for this possibility in the universal saving will of God and the necessity of baptism for salvation. (CCC 1256)
If the nurse used the correct form and matter and had the intent to administer Christian baptism, then the sacrament was valid. But even if your daughter died without baptism, there is reason to trust in God’s mercy and hope for her salvation. The Catechism explains,
As regards children who have died without baptism, the Church can only entrust them to the mercy of God, as she does in her funeral rites for them. Indeed, the great mercy of God who desires that all men 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 have died without baptism. All the more urgent is the Church’s call not to prevent little children coming to Christ through the gift of holy baptism. (CCC 1261)