We poor fallen sinners are conceived with original sin, and so we have fallen bodies and our souls initially lack the state of grace. We must obtain the state of grace in this life in order to obtain eternal life. The state of sanctifying grace can only be obtained by one of the three forms of baptism:
(1) the formal Sacrament of Baptism with water
(2) baptism of desire
(3) baptism of blood
Some atheists were baptized Christian as children, and so they entered the state of grace via formal baptism. To die in the state of grace, such a person must either (a) never commit any actual mortal sin, or (b) repent with perfect contrition after actual mortal sin, or (c) convert to Catholicism and make a good Confession.
An atheist can also enter the state of grace by an implicit baptism of desire. If his failure to believe in God is not an actual mortal sin, due to a sincere but mistaken conscience, he is able to obtain an implicit baptism of desire without conversion to belief in God. He may do so by the sincere and selfless love of neighbor. For all true love of neighbor includes the love of God, at least implicitly. Whosoever loves his neighbor, loves God — even if he does not believe in God. An act of love of neighbor, in full cooperation with grace, is sufficient to obtain a baptism of desire.
Everyone in a state of grace has all three infused theological virtues: love, faith, hope. The atheist in a state of grace exercises the virtue of love by loving his neighbor. But how can he have the virtue of faith without belief in God? His faith is implicit. It is expressed by faith in love, truth, justice and all that is of true and lasting goodness in this life. His implicit faith may even be expressed by his sincere belief that God does not exist. For this belief may well be based on a sincere search for truth and meaning in human life.
If an atheist commits an actual mortal sin, then he can return to the state of grace by implicit perfect contrition. His sorrow for his sins out of love for his neighbor, who was harmed by his sins, includes an implicit sorrow out of love for God. For this type of sorrow for sin is an expression of love of neighbor, and whoever loves his neighbor, loves God. An atheist can even enter the state of grace for the first time, in an implicit baptism of desire, via implicit perfect contrition.
An atheist can enter the state of grace by a baptism of blood. If he risks his life (whether he loses his life on that occasion or not) as an expression of true love of neighbor, in full cooperation with grace, then he may obtain a baptism of blood. By such a selfless act, any human person may enter the state of grace for the first time in an implicit baptism of desire, or return to it by implicit perfect contrition.
How often do any of the above situations actually occur? The grace of God never fails to bear fruit. So I have good reason to hope that a significant percentage of atheists are in a state of grace, and will be saved. But I must also point out that atheism itself is nothing but an obstacle to the path of salvation. It is much easier to obtain eternal life by believing and practicing the Roman Catholic faith. And the further away from Catholicism one goes, the more difficult and treacherous is the path of salvation.
More in my book: Forgiveness and Salvation for Everyone
Please take a look at this list of my books and booklets, and see if any topic interests you.