During the civil war, the communists has substantial support from the academics and intellectuals (think Spanish Civil War). This combined with successful economic policies during the early 50s made Mao overly confident of his support base.
At the time the Nationalists in Taiwan was still recognized as the legitimate government of China on the world stage, so Mao wanted some vocal support. To his surprise he opened the can and worms came out, which caused huge embarrassment, and he blamed it on rightist infiltration.
As a reaction he locked up "naysayers" and implemented radical ideological-based economic policies that ended up in disaster, so he stepped down for a few years. During the time his rival Liu Shaoqi became the chairman, who played with the idea of market economy and was warming up to the west.
This infuriated Mao as it implied his failure as a visionary, so he out-maneuvered Liu and launched the cultural revolution to manufacture support for his vision on a large scale. It helped him to maintain power til his death, but at the cost of running the country into the ground.