When we speak of “baptism” of desire, we are speaking of baptism analogically, insofar as baptism of desire remits original sin, which is the effect of baptism properly speaking, baptism by water. Hence, baptism of desire is called baptism from its effect, insofar as it has the effect of baptism by water.
So, what is baptism of desire, and why does it remit sin? Let us look at what the Council of Trent says:
“Now they (adults) are disposed unto the said justice, when, excited and assisted by divine grace, conceiving faith by hearing, they are freely moved towards God, believing those things to be true which God has revealed and promised,-and this especially, that God justifies the impious by His grace, through the redemption that is in Christ Jesus; and when, understanding themselves to be sinners, they, by turning themselves, from the fear of divine justice whereby they are profitably agitated, to consider the mercy of God, are raised unto hope, confiding that God will be propitious to them for Christ's sake; and they begin to love Him as the fountain of all justice; and are therefore moved against sins by a certain hatred and detestation, to wit, by that penitence which must be performed before baptism: lastly, when they purpose to receive baptism, to begin a new life, and to keep the commandments of God. Concerning this disposition it is written; He that cometh to God, must believe that he is, and is a rewarder to them that seek him; and, Be of good faith, son, thy sins are forgiven thee; and, The fear of the Lord driveth out sin; and, Do penance, and be baptized every one of you in the name of Jesus Christ, for the remission of your sins, and you shall receive the gift of the Holy Ghost; and, Going, therefore, teach ye all nations, baptizing them in the name of the Father, and of the Son, and of the Holy Ghost; finally, Prepare your hearts unto the Lord. This disposition, or preparation, is followed by Justification itself, which is not remission of sins merely, but also the sanctification and renewal of the inward man, through the voluntary reception of the grace, and of the gifts, whereby man of unjust becomes just, and of an enemy a friend, that so he may be an heir according to hope of life everlasting.”
If we look at this carefully, we can see that what the council of Trent is laying out is really the material dispositions in man of Faith, Hope and Charity. The first thing mentioned is that they are moved towards God, believing those things to be true which God has revealed. The second thing is that they consider from the fear of divine justice and by considering the mercy of God, they are raised to hope in God. Finally, that they begin to love him as the fountain of all justice. The last condition mentioned is that they purpose to receive baptism, to begin a new life, and to keep the commandments of God.
From this material disposition necessarily follows the supernatural virtues of Faith, Hope, and Charity, and thus of course the justification of the man, and his sanctification and renewal.
It should be noted that the fourth disposition for this justification, the purpose to receive baptism, to begin a new life, and to keep the commandments of God, is necessarily included in the third condition. This is because everyone who truly loves God wishes to keep his commandments, and to give up his offenses against God and to begin a new life. Likewise, anyone who truly loves God desires, at least implicitly, baptism by water, since this is the means that God has established for salvation.
There is a good text from St. Thomas which sums up this entire description:
“Therefore in all things it must be said that God is the first principle in justice and that whosoever gives to God the greatest thing that lies in him by submitting the mind to Him, such a one is fully just: ‘Whosoever are led by the Spirit of God, they are the sons of God” (Rom 8:14). And hence he says, Abraham believed God, i.e., submitted his mind to God by faith: “Believe God, and he will recover thee: and direct thy way, and trust in him” (Sir 2:6); and further on (2:8): “ Ye that fear the Lord believe him,” and it was reputed to him unto justice, i.e., the act of faith and faith itself were for him, as for everyone else, the sufficient cause of justice. It is reputed to him unto justice by men exteriorly, but interiorly it is wrought by God, Who justifies them that have the faith. This he does by remitting their sins through charity working in them.” (Commentary on Galatians, Cap. 3, Lectio 3)
What the council of Trent describes as the preparation for justification, St. Thomas describes in a very compact form: The full submission of one's mind to God. Any man who does such an act is completely justified, since such an act is one of faith working through love. If we look at the description of the preparation for justification given by the council of Trent, we can see that St. Thomas's definition implies everything in it.
Because, one who fully submits his mind to God, necessarily accepts all that God has revealed to him, and is willing to accept everything else God will reveal. Furthermore, this implies hope and love, since one does not completely submit oneself to another without love of him, and hope and trust in him.
It is this kind of full submission of the mind to God which is commonly called baptism of desire; after baptism it is commonly called a perfect act of contrition. By such a submission man is justified, and made holy before God. If we apply this to the idea of salvation through implicit faith, we can summarize the entire argument for implicit faith in a nutshell.
Before the coming of Christ, the only way for men to be justified was through this perfect submission of the mind to God. At least those men who knew of God's existence, through the grace of God, were able to submit themselves fully to God and make an act of perfect love of Him. The only thing they needed for this was the knowledge of God's existence. They did not need a knowledge of Christ, or of God as Trinity, or the other truths of the faith.
Similarly, after the coming of Christ, those men who know of God's existence are able to make an act of perfect submission of their minds to God, and to love Him. This might be a faithful Jew who earnestly desires the coming of the Messiah, or it might be a Muslim who truly wishes to serve God. By this act they are justified and freed from sin, and thus belong to the church, no matter how implicitly.
It is obvious, of course, that since the catholic church is the true church founded by God, that as soon as such a person comes to the knowledge of the church, and that it is the church in which God wishes all men to be saved, he will immediately desire to enter it, and if he did not desire to enter it even knowing this, that would show that his mind was not fully submissive to God. This is why Lumen Gentium says,
“In explicit terms He Himself affirmed the necessity of faith and baptism and thereby affirmed also the necessity of the Church, for through baptism as through a door men enter the Church. Whosoever, therefore, knowing that the Catholic Church was made necessary by Christ, would refuse to enter or to remain in it, could not be saved.”(LG 14)
From this argument it follows that someone who affirms the necessity of explicit faith in Christ for justification is forced to say that God refuses those people who do not know explicitly of Christ the grace to make an act of love of Him. Since this was not the case for those before Christ, one would be forced to say that because of Christ's act of perfect love for mankind on the cross, God now refuses those who do not have explicit knowledge of him the grace to love him, regardless of the fact that he previously gave this grace to them.