“There are some among you who hold to the teaching of Balaam, who taught … the Israelites to sin so that they ate food sacrificed to idols and committed sexual immorality.” (Apocalypse 2:14)
The gentile prophet Balaam appears in the Old Testament book of Numbers, chapters 22-24. He is hired by a pagan king to curse the Israelites before they can conquer the pagan king’s territory. Balaam warns the king that he cannot do anything the gods do not approve of; the king hires him anyway. Balaam attempts to curse the Israelites three times but each time his words become blessings for the Israelites. The king is furious.
The three blessings that Balaam pronounced over the Israelites were understood by the Israelites to refer to the Messiah, especially the third blessing: “A star will rise out of Jacob, a scepter shall rise out of Israel.” Christians often read this story at Christmas and Epiphany.
The story of Balaam and his donkey reports that as Balaam was going to a cliff that was near the Israelite camp–he wanted to look out over the Israelites as he tried to curse them–the donkey he was riding suddenly refused to walk any further. Balaam kept hitting the donkey, trying to force it to go forward. At least the donkey turned to him and said, “Don’t you see the angel blocking the road ahead?!” Shocked that the donkey spoke, he looked ahead and DID see the angle blocking the road. But the angel withdrew and allowed the donkey and Balaam to go forward although Balaam never was able to curse the Israelites. (Balaam’s donkey is one of the only two animals who are ever reported to speak in the Bible; the other one is the serpent in Eden.)
But in Numbers 25, we are told that the Israelites abandoned the true God and ate non-kosher food and engaged in a wide variety of sexual misbehavior. Later in Numbers, we read that Balaam and the pagan king taught the Israelites to do these things; they hoped that God would abandon the people if they disobeyed the commandments they had been given. (Since the king couldn’t get Balaam to curse the people, he tried this as a Plan B.) The plan worked: God struck the Israelites with a plague because of their disobedience. But they repented and eventually conquered the pagan king’s territory anyway.
The heretics in Asia Minor–false Christian teachers who instruct their followers to behave in ways St. John thinks are sinful–are compared to Balaam who taught the Israelites to disobey God even after he had blessed them and promised that the Messiah would appear among them.