Matthew 2 recounts the familiar Christmas tale of three “wise men” (Greek magoi) visiting Palestine and worshiping the young Jesus with gifts of gold, frankincense and myrrh. Who or what were the Magi?
Most of our information about the precedents to the Gospel account comes from the Histories of Herodotus, where the term appears a couple of dozen times and mostly is used to refer to a priestly caste among the ancient Medes, which was particularly known for oneiromancy (dream interpretation).
In his own time, Herodotus indicates that the magoi were priests of Persia, and at that time the dominant religion of Persia was Zoroastrianism, making them Zoroastrian priests.
But by the time of Christ, the term magos (singular of magoi; the Latin equivalents are magus singular and magi plural) had become common in the Mediterranean region for a certain sort of scholarly profession (without indicating any particular religion or culture), as attested for instance in the writings of Strabo and Plutarch.
We know of at least three Jews who were magoi: Simon Magus (Acts 8:9-24), Elymas (Acts 13:6-11. amd Atomos of Cyprus (Josephus, Antiquities XX.vii.2). The NT gives a definitely unfavorable impression of the first two. All three were described as being attached to the courts of highly placed Roman officials. Positive assessments of magoi and their knowledge are to be found in such writers as Philo of Alexandria and Cicero.
The Septuagint uses the Greek word magos to translate various Hebrew terms for necromancers, conjurors, and so forth. The term came to be used for various types of adepts in magic (the English word “magic” itself derives from magos).
Matthew makes no effort to identify the Magi of his story, telling us only that they come from the East.
There is a significant Mormon meme of trying to avoid the idea that the Magi were pagan priests of some sort schooled in the arts of dream interpretation and astrology. Consider, for example, this extract from a 2006 article in the Church News:
As to the identity of the wise men, there is no scriptural support for the notion that they were astrologers or members of a cult from Media and Persia. Elder McConkie even objects to the term Magi, noting that the very word magic derives from it and relates to the ritual practiced by the apostate Persian cult.
“It is much more probable that they were devout men who knew of our Lord’s coming advent,” he wrote, “including the promise that a new star would arise, and that they came as prophets of any age would have done to worship their King. It is clear that they were in tune with the Lord and were receiving revelation from Him, for they were `warned of God in a dream that they should not return to Herod.’ (Matt. 2:12)” (Mormon Doctrine, p. 462.)
Personally I find this point of view to be overly defensive. The account seems to reflect them coming from a far distance, and the questions the Magi ask suggest that they themselves were not Hebrews. The main point of identifying the visitors as Magi is to explain their capacity to read the heavenly portents in the sky. There is no need to make them men of the ancient Israelite covenant, much less to Mormonize them as BRM seems to want to do. The premise seems to be that foreign priests cannot receive genuine revelation from God, a premise that I would reject.