Acts 15:7-8
(7) After there had been much debate, Peter stood up and said to them, Brethren, you know that in the early days God made a choice among you, that by my mouth the Gentiles would hear the word of the gospel and believe.
(8) And God, who knows the heart, testified to them giving them the Holy Spirit, just as He also did to us.
Ephesians 1:13
In him you also, when you heard the word of truth, the gospel of your salvation, and believed in him, were sealed with the promised Holy Spirit.
Cornelius and the other Gentiles with him were given (= sealed with) the Holy Spirit before their water baptism (Acts 10:48).