Balaam was the magician-prophet who was hired by the king of Moav to attack the Israelite with curses; Laban was Jacob's father-in-law and Issac's brother-in-law. Though divided in time by several hundred years, the Midrash says they are the same person. Why?
The simple person will give a simple answer and say that the claim is made by the Midrash because (a) its true; and (b) we can be certain its true because we posses a tradition, passed teacher to student, that is incontestably true.
Unfortunately, such a claim about the mesorah is often made ridiculous by the contents of the mesorah itself.
For instance, the Talmud (BT Sanhedrin 105a) says that Balaam's father Beor was Laban; meanwhile, TPJ and Yalkut Shemoni say that Balaam himself was Laban. Was Laban Balaam or was he his father Beor? An incorruptible mesorah would not have produced two contradictory identifications. This alone undermines the simple answer, parodied above, and shows that the simple person who insists on it is not acting out of faith or piety, but from ignorance.
The suggestion that Laban was Balaam , then, is not a statement of received, historical fact but the product of an interpretation. The Sages saw something, or perhaps a collection of things, which suggested to them that Balaam and Laban were the same person (or, if you with to allegorize their words*, that they shared some essential traits.)
*As usual, I think such allegories are afterthoughts that strain credulity. Here is TPJ on Num 22:5: He sent messengers to Laban the Aramean he is Balaam who wanted to swallow [= bala] the people of Israel. This does not sound like an allegory. It sounds like a positive identification, and its far simpler to say that the author of TPJ believed what he wrote, ie, the Laban and Balaam were the same man.
What did the Sages see? Here's a proposed list:
1: Numbers 22:5 tells us Balaam lived near "The River" This is either the Tigris or the Euphrates. The Book of Jubilees places Aram's between the Tigris and the Euphrates (Wikiepdia). Aram is Laban's home region and also how he is often identified (Laban the Aramean). Moreover, Deuteronomy 23:5 says specifically Balaam came from Aram-Naharaim (the Aram of two Rivers)
2: Laban knows the four-letter names of God and uses it to greet Abraham's servant, and at least three more times besides; Balaam also knows this names and uses it first to brush off Balak's messenger, and three more times as his story continues. Pharaoh, remember, did not recognize this name. The fact that Balaam and Laban, both pagans, used it comfortably suggests they have something in common.
3: God speaks to both Laban (Gen 31:24) and Balaam (Num. 22:20) in dreams at at night. The language used to describe these visitations is nearly identical
And God came to Laban the Aramean in a dream at night
And God came to Balaam at night
So to sum up, Laban and Balaam both came from the same place, shared a recognition of God that was unexpected for their time and place, and they were both visited by God in dreams. I propose that it was these three things that led the authors of TPJ and Yalkut Shemoni to conclude that Balaam and Laban were one and the same.
Search for more information about Balaam and Laban at4torah.com