The gospel of Luke records the conception of Jesus Christ in Luke 1:26-56 and His birth in Luke 2:1-7. Eight days later according to Mosaic custom, Jesus was taken to the temple to be circumcised and given His name. Then 40 days after His birth, He was taken to the temple and dedicated to God in obedience to Leviticus 12:4-5. Some time after that, the wise men or magi visited Christ (Matthew 2:1-11). The answer to the question is found in Matthew 2:1, 11 and 16.
The Magi came from the east Babylon/Persia. They studied the sky by trade and where guided by Daniel's prophecy to seek the Messiah. Many Jews remained in Babylon/Persia after the Babylonian exile of the 6th century B.C. and did not return to Israel. Since God later appeared to them in a dream, it is reasonable to think they we were aware and perhaps even worshipped the one true God.
Gold is a symbol of divinity, pointing to Christ’s identity as the Son of God.
Fragrant frankincense was often burnt as an offering to God. This could symbolize the fact that Jesus would give Himself up as a sacrifice.
Myrrh was a spice used in embalming. It symbolizes bitterness and suffering. This could symbolize how Jesus would grow up to suffer and die.