I would like to discuss St. Thomas's position in some detail, because he is often cited by proponents of the necessity of explicit faith for salvation, even though his actual position is much more nuanced than they believe.
St. Thomas Aquinas teaches in I-II, Q.89, A.6 that when a child reaches the age of reason, if he orders himself toward his last end as well as he can, he immediately attains sanctifying grace (which we would call baptism of desire), and if he does not, he sins mortally. His state of knowledge is not relevant, so the child is able to attain grace even if he is completely ignorant of the Church and Christ.
"I answer that, It is impossible for venial sin to be in anyone with original sin alone, and without mortal sin. The reason for this is because before a man comes to the age of discretion, the lack of years hinders the use of reason and excuses him from mortal sin, wherefore, much more does it excuse him from venial sin, if he does anything which is such generically. But when he begins to have the use of reason, he is not entirely excused from the guilt of venial or mortal sin. Now the first thing that occurs to a man to think about then, is to deliberate about himself. And if he then direct himself to the due end, he will, by means of grace, receive the remission of original sin: whereas if he does not then direct himself to the due end, and as far as he is capable of discretion at that particular age, he will sin mortally, for through not doing that which is in his power to do. Accordingly thenceforward there cannot be venial sin in him without mortal, until afterwards all sin shall have been remitted to him through grace. " (I-II, Q.89, A.6)
Okay. Let us see what St. Thomas's position is on implicit faith. If we look at the article that I just quoted, I-II, Q.89, A.6, we see that St. Thomas holds to the idea of sanctification by implicit faith. St. Thomas claims in this article that a child can attain sanctifying grace before baptism, and even before he attains explicit faith in the Trinity and Incarnation, if there is no one to teach the child at the time when he reaches the age of reason.
How do we know that this is St. Thomas's position? One of the objections is, "An age can be determined in which the child can first perform an actual sin. When he comes to this age, he can stand for at least a brief space of time, without sinning mortally, since this happens even in the most wicked men. Now in that space of time, howsoever short, the child can sin venially. Therefore venial sin can be in someone with original sin, without mortal sin." In the body St. Thomas also says, "The first thing which occurs to someone to consider, is to deliberate about himself. And if he orders himself to the due end, he attains by grace the forgiveness of original sin. But if he does not order himself to the due end, insofar as in that age he is capable of discretion, he will sin mortally, not doing what he is able to do."
Let's put these texts together. The objection is that a child can be in original sin, attain the age of reason, and then refrain for at least a short time from mortal sin. Within this time, he may happen to commit a venial sin. If this happens, then the child will have both original and venial sin, but not mortal sin. The purpose of St. Thomas's article is to prove that this cannot happen.
In the body, St. Thomas says that when someone reaches the age of reason, the first thing he does is consider his end. If he aims at his end rightly, he attains by grace the forgiveness of original sin. If he aims at his end wrongly, he commits a mortal sin. After one of these alternatives has happened, the child may commit a venial sin, and then he will either have grace together with venial sin, or mortal sin together with venial sin, depending on which alternative happened. The child will never have original sin and venial sin together without mortal sin, however, because this is excluded by each of the alternatives.
In the response to the objection, St. Thomas says that the child will commit a mortal sin of omission unless he turns to God as soon as possible. And for this reason there cannot be a space of time when the child is in original sin without mortal sin, during which he might commit a venial sin, so as to have venial sin together with original sin, but without mortal sin.
What does this tell us? St. Thomas's position is that after the age of reason, there is no period of time, however brief, during which the child is in original sin, but not mortal sin. Why not? If there is such a period of time, then the child might commit a venial sin. This was the objection. St. Thomas answers it by saying that there is no such period of time. Not five days, not five hours, not five minutes. As soon as the child has reached the age of reason, if the child is in the state of original sin, the child is also in the state of mortal sin. Otherwise there would be the interval of time that St. Thomas excludes after the age of reason, namely a time when the child is in original sin but not mortal sin.
What happens if the child reaches the age of reason and turns to God according to his ability? According to St. Thomas, the child attains by grace the remission of original sin. According to St. Thomas, then, the pagan child is born in original sin. He comes to the age of reason. If he does not commit a mortal sin, but turns to God as well as he can, “insofar he is capable of discretion”, then in that very moment he attains grace and the remission of original sin. Then, in God's own time, God will lead him to explicit faith in the Trinity and the Incarnation.
Nor can one say that St. Thomas is saying that at the moment when a pagan child reaches the age of reason, if he has not been instructed about the faith, there is a moral inevitability that he will commit a mortal sin in that very moment. In the first place, this position is impossible in itself, since although without grace one cannot avoid sinning for a long period of time, it is not true that without grace one cannot avoid a particular sin at a particular moment. If one could not, it would not be a sin. Second, this position is directly against the very words of St. Thomas, as will be seen below.
Quaestiones Disputatae, "De Veritate," Q. 14, art. 11: Objection: "It seems that it is not necessary to believe explicitly. For nothing should be accepted, from the acceptance of which something inappropriate would follow. But if we accept that it is necessary to salvation that something be believed explicitly, something inappropriate would follow. For someone might have been reared in the woods, or among wolves; and such a one cannot know explicitly anything of faith, so that thus there would be a man who would necessarily be damned-which is inappropriate; hence it does not seem to be necessary to believe in anything explicitly."
Response: "The answer to the first argument is that nothing inappropriate follows from acceptance of the fact that everyone is bound to believe something explicitly, even someone reared in the woods or among brute animals; for it belongs to Divine Providence to provide everyone with what is necessary for his salvation, provided that he on his part place no obstruction in the way. For if anyone thus bought up were to follow the guidance of natural reason in seeking good and shunning evil, it must be held most certainly that God would reveal to him even by an internal inspiration those things which are necessary to be believed, or would direct some preacher of the Faith to him, as he sent Peter to Cornelius (Acts 10)." It is very clear here that St. Thomas is saying that explicit faith is necessary for salvation, and he asserts in the body of this article that explicit faith in the Trinity and the Incarnation are necessary for salvation. But note: necessary for "salvation," which is not the same as necessary for the state of grace. According to St. Thomas, someone raised in the woods might attain the state of grace first, by the baptism of desire, and then later God would teach him the truths of the Trinity and Incarnation. Thus St. Thomas says above that if someone were to follow natural reason, then God would respond by teaching him the faith. But this implies that there is some act by which the man follows natural reason first, and then afterwards, even if very shortly afterwards, God teaches him the faith, just as Cornelius worshipped God first, and then afterwards God sent Peter.
We have already seen that St. Thomas holds that the child attains grace in the first act in which he follows natural reason. Thus we can see that he holds that it is possible for a child to attain sanctifying grace by following natural reason, and then later, God will reveal to him the mystery of the Trinity and the Incarnation.
Again, the concrete example that St. Thomas give of this is Cornelius. St. Thomas explicitly maintains that Cornelius received an implicit baptism of desire by his implicit faith in Christ, and then later God sent Peter to him to teach him the truths of the faith.
“Unbelief does not so wholly destroy natural reason in unbelievers, but that some knowledge of the truth remains in them, whereby they are able to do deeds that are generically good. With regard, however, to Cornelius, it is to be observed that he was not an unbeliever, else his works would not have been acceptable to God, whom none can please without faith. Now he had implicit faith, as the truth of the Gospel was not yet made manifest: hence Peter was sent to him to give him fuller instruction in the faith.” (II-II, Q. 10, A.4, Reply to the third)
“As stated above, man receives the forgiveness of sins before Baptism in so far as he has Baptism of desire, explicitly or implicitly; and yet when he actually receives Baptism, he receives a fuller remission, as to the remission of the entire punishment. So also before Baptism Cornelius and others like him receive grace and virtues through their faith in Christ and their desire for Baptism, implicit or explicit: but afterwards when baptized, they receive a yet greater fulness of grace and virtues. Hence in Ps. 22:2, "He hath brought me up on the water of refreshment," a gloss says: "He has brought us up by an increase of virtue and good deeds in Baptism.”
Thus it is very clear that St. Thomas holds that Cornelius was justifed by his implicit faith and implicit desire for baptism before he knew about Christ or the Trinity. Nevertheless, it is St. Thomas's belief that, after the promulgation of the Gospel, God will bring all such people as Cornelius to an explicit knowledge of Christ and the Trinity.
Now, let us examine in what sense St. Thomas believes that explicit faith is necessary for salvation. We can investigate this question by asking, “Why does God give explicit faith to someone like Cornelius, since he is already sanctified by his implicit faith?” St. Thomas answers this question in the article where he asks, “Whether grace is necessarily given to whoever prepares himself for it, or to whoever does what he can?”(I-II, Q.112, A.3) Within the article, he distinguishes, and says that considered on the part of man's free will, there is no necessity that he be given grace, since the act of giving grace exceeds any preparation on man's part. However, on the part of God, he says that there is a certain necessity, not of coercion, but of infallibility, insofar as God's intention never fails.
This comparison is very helpful when looking at the necessity of explicit faith for salvation. Obviously St. Thomas does not believe that it is necessary by an absolute necessity, both because men before Christ were saved without it, and also because men after Christ can be justified, and made fit for heaven without it. However, he seems to hold a necessity of infallibility, insofar as God intends that after the advent of Christ, every man who dies justified also dies with explicit knowledge of Christ.
From the foregoing we can gather that when St. Thomas says explicit faith is necessary for salvation, he is using an extended sense of necessary, and not what people normally mean when they say that explicit faith is necessary for salvation.