Eternal salvation has always been by grace through faith. This was true in OT times as much as it is in NT times.
If this were not so, Paul would have been wrong when he wrote:
Therefore by the deeds of the law no flesh will be justified in His sight, for by the law is the knowledge of sin.
Not only that, Paul also traces justification by faith back to Abraham and David (Rom 4:1-12).
Jesus Himself taught that the new birth was a subject which an OT teacher like Nicodemus should know about:
“Are you the teacher of Israel, and do not know these things?”
The writer of Hebrews speaks of the Messianic hope as known to Moses, since he regarded “the reproach of Christ (Greek:”of the Christ,” i.e., of the Messiah) as being “greater riches than the treasures of Egypt” (Heb 11:26).
Not surprisingly, Isaiah prophesied about the sufferings of Christ and linked them with justification (see Isa 53:11).
We should expect, therefore, to find actual cases of regeneration and/or justification in the OT. Of course, Gen 15:6 recounts the justification of Abraham and is a favorite Pauline Text (see Rom 4:3 and that whole chapter; Gal 3:6). But another case of OT salvation is found in the call of Samuel in 1 Sam 3:1-14.
Of particular interest in this account is the statement of 3:7:
Now Samuel did not yet know the Lord, nor was the word of the Lord yet revealed to him.
We can note that there are two things that have not thus far happened to Samuel: 1) he hasn’t come to know the Lord yet, and 2) he has never had a revelation from God. The latter refers to his role as a prophet. We suggest that the former refers to his personal salvation.*
This conclusion is strengthened when we recall our Lord’s own definition of eternal life:
“And this is eternal life that they may know You, the only true God, and Jesus Christ whom You have sent.”
—John 17:3 (italics added)
Eternal life brings with it the knowledge of God. In fact, the knowledge of God is one of the specific benefits of the New Covenant. Jeremiah writes:
“No more shall every man teach his neighbor, and every man his brother, saying, ‘Know the Lord,’ for they all shall know Me, from the least of them to the greatest of them, says the Lord.”
—Jer 31:34 (cf. Heb 8:11)
This is very parallel to Paul’s words: “And so all Israel will be saved” (Rom 11:26). All saved people—past, present and future—receive the knowledge of God, i.e., they have eternal life.
There is no reason to doubt that, before Samuel’s call, Eli had instructed him in the Messianic hope which the Lord had announced to His people. Samuel must have had the best instruction in that hope which Israel could provide since he was being reared by the current Judge, Eli himself (1 Sam 4:18). But, apparently, he had not yet believed in the Lord from whom the Messianic promise had come. His failure to recognize God’s voice the first three times he was called graphically shows that God was a stranger to him. That is, “he did not yet know the Lord!”
Thus, when God visited Samuel that night, he was both regenerated and installed as a prophet in Israel. In a similar though different way, at the moment of our conversion we too receive salvation and a spiritual gift from the Holy Spirit (see 1 Pet 4:10, 11).
By contrast with Samuel, Eli’s sons Hophni and Phinehas were both wicked and unregenerate:
Now the sons of Eli were corrupt; they did not know the Lord.
—1 Sam 2:12 (italics added)
But these two men who had so seriously abused their office are now to be replaced by a young man who is both regenerate and who will prove to be loyal to God.