Mossadegh convinced the government to give him 6 months of "emergency powers", ostensibly to fix the financial problems of Iran. In reality, he did a little of that, but also used his powers to further entrench himself by diminishing the power of the Shah. And then he got another 12 months emergency powers, and used it to redistribute land to the poor. Unfortunately at that time, Iran was also incredibly insolvent (due to the British boycott), and so the poor were not happy.
You might argue that Mossadegh would have succeeded if not for the British boycott.. sure, maybe he would have. But what do you expect to happen when you forcibly take all of the British resources? Should they just have said "Oh fine, have them, let's keep doing business together"?
The clerics, at this point, were already the proverbial kingmakers in Iran. They backed Mossadegh when he was expedient, and they backed the Shah when Mossadegh failed them. There's no reason to believe that Iran would have continued under Mossadegh into some kind of Socialist paradise - he probably would have just been deposed by the religious nuts a few years later regardless, just as happened with the Shah.