Summary
In Romans 1:18ff. and Psalm 19, the Bible teaches that all human beings are without excuse for not believing in and submitting to God, due to the created world pointing at every turn to Him. Such a concept in theology is typically called “natural revelation”.
Content
Natural revelation holds that no mentally mature humans get a pass
Paul doesn’t stutter in Romans 1:18ff., even if what these verses clearly teach will no doubt offend people. No one gets a pass. No one at all. Every human being that has ever grown to maturity will be justly condemned, if in fact they have chosen to harden their hearts to the truth of God’s existence and their need for a savior.
Romans 1:18-25 says in no uncertain terms that all human beings actually know that God exists from that which has been created, so that all are without excuse. (One might also compare Psalm 19).
In theology, this teaching that creation itself tells us of God (thereby leaving mankind completely without excuse when it comes to belief in and submission to God) is typically called “natural revelation” (or “general revelation”). It is distinct from “special revelation”, which is God’s specific revealed truth (as came through prophets in the past, and now inspired scripture = the Bible).
I should note that many theologians (including myself) hold that children who die before reaching a certain degree of self-awareness (as well as people with severe enough mental handicaps that they never reach such a point) are automatically saved. This doesn’t contradict natural revelation in a general sense, since both of these groups are obviously not “the normal human condition.” And so it is that there will be in heaven people “from every nation, from all tribes and peoples and languages” (Revelation 7:9), despite the fact that some people cry contradiction since many parts of the world throughout history seem to have not received the gospel of Jesus Christ, and the Bible makes it very clear that we are saved through Him and only Him (cf. John 10:9, 14:6; Acts 4:12).
If people must be saved through belief in Jesus Christ, does that inherently mean that places that never got the gospel had no people who accepted natural revelation?
We do not know specifics in all these situations, and God is more than capable of using overtly supernatural means (such as dreams) to communicate the truth, were someone in such a circumstance to legitimately desire the gospel (that is, not reject natural revelation).
It is certainly possible that God did this, although that doesn’t mean that God did in fact do this, or at least do it particularly commonly. It is one of those things we can only for certain on the other side.
One might compare the wise men who followed the star and brought Jesus gifts. These men were Gentiles:
Daniel and his fellow Jews are never called “magi” themselves; to the contrary, the Septuagint distinguishes them from the magi: Daniel and his Jewish friends were “ten times wiser than all the enchanters and magi (μάγους; mágous)” (Dan 1:20 LXX). Thus, while Daniel becomes the chief of all sages under Nebuchadnezzar, Scripture provides no evidence that Daniel was one of the magi or that Jews became magi while living in Babylon.
[T]he visitors to Jerusalem ask, “Where is he who has been born king of the Jews?” (Matt 2:2). This question about the “king of the Jews” suggests that the magi are not Jews themselves, or else they would have asked, “Where has our king been born?” Indeed, since only Gentiles use the phrase “king of the Jews” elsewhere in Matthew (cf. 27:11, 29, 37) it’s likely that the magi are Gentiles also—Jews, on the other hand, refer to the “king of Israel” (27:42).
[I]f the magi were learned Jews under the tutelage of Daniel’s sagacious successors, then why don’t they already know that the Jewish Messiah must be born in Bethlehem? Based on the prophecy of Micah, the Jewish chief priests and scribes know that the Messiah will be born “in Bethlehem of Judea” (2:5) but the magi do not.
The Gospel narrative recalls verses from Israel’s Scriptures that foresee Gentiles bringing gifts to Israel. Once the magi arrive in Bethlehem, they offer Yeshua “gifts (δῶρα; dora)” of “gold and frankincense (χρυσὸν καὶ λίβανον; chrusòn kaì líbanon) and myrrh” (Matt 2:11). This scene echoes the Psalms’ picture of other nations bringing “gifts” (δῶρα; dora) to Israel (cf. Ps 72:10 [71:10 LXX]; 76:11-12 [75:11-12 LXX]). Isaiah 60:5-6 calls these foreign gifts the “wealth of the Gentiles,” which includes “gold and frankincense” (χρυσίον καὶ λίβανον; chrusíon kaì líbanon). Matthew also notes that the magi bring “myrrh” (σμύρνα; smúrna)—an aromatic resin that the Jewish Queen Esther receives from a Persian king (see Est 2:12 LXX). More, the oil made from myrrh—called στακτή (stakté)—is said to have been an item of trade among traveling Gentiles in Joseph’s day (see Gen 37:25 LXX), and royal figures of other nations offer it as tribute to King Solomon (cf. 1 Kgs 10:25; 2 Chron 9:24 LXX). Thus, it is fitting for Matthew’s traveling Gentile magi to offer myrrh to Jesus, the King of the Jews.
I quoted heavily from this single source because it does a very good job establishing the point—kudos to the writer. I will also add to all this that God most certainly communicated with the wise men in dreams because scripture directly says as much (cf. Matthew 2:12).
The wider point is that God leads all those who desire to have a relationship with Him to the truth—we may trust in this absolutely unreservedly. And so it is that despite being born as the Savior of the Jews—born to Israel specifically, as their prophesied Messiah—some of the more notable guests in the welcoming of Jesus Christ into the world were Gentile travelers from afar.
The implication should not be lost on us!