Revelation 20:4-5 says:
“And I saw thrones, and they sat on them, and judgment was committed to them. And I saw the souls of those who had been beheaded for their witness to Jesus and for the word of God, who had not worshipped the beast or his image, and had not received his mark on their foreheads or their hands. And they lived and reigned with Christ for a thousand years. But the rest of the dead did not live again until the thousand years were finished. This is the first resurrection”
These verses indicate that there will be two resurrections (and two judgments). The first occurs at the return of Christ, at the start of the “thousand years”. The second occurs at the end of the “thousand years”. Compare this with 1 Corinthians 15, which talks about the dead “in Christ” being raised at his coming (v23) and death being destroyed at the end of reign of Christ (v26).
The implication of these passages is that this first resurrection is for those in Christ, i.e. those who have entered into a relationship with Christ. This would certainly include those baptised into Christ, but might also include a judgment for those who are responsible to Christ though never having been baptised.