Well the practice is not based on that at all. It is based on revelations to Joseph Smith. But that passage is ONE evidence of the practice in early christianity, and there are others.
There are a few other citations that show this, but I will supply you with the easiest obtainable internet evidence, but here is the quote from St. John
Chrysostom:
Homily XL.
1 Corinthians chapter 15, verse 29Else what shall they do which are baptized for the dead? if the dead are not raised at all, why then are they baptized for the dead?
HE takes in hand again another topic, establishing what he said at one time from what God doeth, and at another from the very things which they practice. And this also is no small plea for the defence of any cause when a man brings forward the gainsayers themselves as witnessing by their own actions what he affirms. What then is that which he means? Or will ye that I should first mention how they who are infected with the Marcionite heresy pervert this expression? And I know indeed that I shall excite much laughter; nevertheless, even on this account most of all I will mention it that you may the more completely avoid this disease: viz., when any Catechumen departs among them, having concealed the living man under the couch of the dead, they approach the corpse and talk with him, and ask him if he wishes to receive baptism; then when he makes no answer, he that is concealed underneath saith in his stead that of course he should wish to be baptized; and so they baptize him instead of the departed, like men jesting upon the stage. So great power hath the devil over the souls of careless sinners. Then being called to account, they allege this expression, saying that even the Apostle hath said, “They who are baptized for the dead.”
haywardfamily.org/ccel/fa…#P2004_1215726
The Marcionite heresy included this practice which Chrysostom obviously condemns.
I know you are not used to thinking this way, but the existence of a heresy indicates that some concept is currently believed at that time in the early church. The way that the Marcionites did it is obviously wrong, but they GOT THE IDEA FROM A TRADITION WHICH WAS ALREADY LOST and passed down incorrectly.
I don’t claim to be a scholar on this issue. But that is not the point of the thread anyway.
I think I have demonstrated that there is at least one other way in which the “gates of hell” prophecy can reasonably be interpreted.