In 1934 Gomułka went to Moscow, where he lived for a year. Upon his return to Poland he was arrested and spent most of his time in prison until the beginning of World War II. During the war, Gomułka became an influential Polish communist and in 1943 convinced Stalin to restore the Polish Workers' Party (Polska Partia Robotnicza). He was a Deputy Prime Minister in the Provisional Government of Republic of Poland - Rząd Tymczasowy Rzeczypospolitej Polskiej, from January to June 1945, and in the Provisional Government of National Unity (Tymczasowy Rząd Jedności Narodowej), from 1945 to 1947. Using his position in the government, he assisted the Communists in winning the 3 x Tak (3 x Yes) referendum of 1946 and winning the Polish legislative elections, 1947 and became, as he said, "the hegemon of Poland". However, between 1951–1954, skirmishes between various Party factions led to Gomułka's imprisonment, denounced as right-wing and reactionary, and expelled from the Polish United Workers' Party.
After the death of Stalinist Prime Minister Bolesław Bierut in 1956, a brief period of destalinization began, raising popular hope for reform. In June 1956, an insurrection began in Poznań. The workers rioted to protest shortages of food and consumer goods, bad housing, decline in real income, shipments of commodities to the Soviet Union and poor management of the economy. The Polish government initially responded by branding the rioters "provocateurs, counterrevolutionaries and imperialist agents". Security forces killed and wounded scores of protesters. Soon, however, the party hierarchy recognized the riots had awakened nationalist sentiment and reversed their opinion. The rioters became "honest workers with legitimate grievances". Wages were raised by 50% and economic and political change was promised.
Edward Ochab, the Polish Prime Minister, invited the now-rehabilitated Gomułka to serve as First Secretary of the Party. Gomułka insisted that he be given real power to implement reforms. One specific condition he set was that the Soviet Marshal Konstantin Rokossovsky, who had ordered troops against the Poznan workers, be removed from the Polish Politburo and Defense Ministry, to which Ochab agreed. On October 19, the majority of the Polish leadership, backed by the army and also the Internal Security Corps, brought Gomułka and several associates into the Politburo and designated Gomułka as First Secretary of the Party. The Soviet leadership viewed events in Poland with alarm. Simultaneously with troop 'manoeuvres' on the Soviet-Polish border, a high-level delegation of the Soviet Central Committee flew to Poland. It was led by Khrushchev and included Mikoyan, Bulganin, Molotov, Kaganovich, Marshal Konev and others. Gomułka made it clear that Polish troops would resist if Soviet troops advanced, but reassured the Soviets that the reforms were internal matters and that Poland had no intention of abandoning communism or its treaties with the Soviet Union. The Soviets yielded. Gomułka was confirmed in his new position. Information about events in Poland reached the people of Hungary via Radio Free Europe's news and commentary services during 19 - 22 October 1956. A student demonstration in Budapest in support of Gomułka, asking for similar reforms in Hungary, soon sparked the Hungarian Revolution of 1956.
Initially very popular for his reforms and seeking a "Polish way to socialism", and beginning an era known as Gomułka's thaw, he gradually softened his opposition to Soviet pressures. In the 1960s he supported persecution of the Roman Catholic Church and some party intellectuals (e.g., Kołakowski). He took part in the Warsaw Pact intervention in Czechoslovakia in 1968. At that time he was also responsible for persecuting students and intelligentsia as well as toughening censorship of the media. In 1968 he incited an anti-Zionist propaganda campaign, as a result of Soviet bloc opposition to the Six-Day War. This was a thinly veiled anti-semitic campaign designed to keep himself in power by shifting the attention of the populace from stagnating economy and communist mismanagement. Gomułka later claimed that this was not deliberate. He should be remembered as a Polish nationalist who betrayed the trust resulting from de-Stalinization and replaced it with personal, criminal dictatorship.
In December 1970, a bloody clash with shipyard workers in which several dozen workers were shot to death forced his resignation (officially for health reasons; he had in fact suffered a stroke). A dynamic younger man, Edward Gierek, took over the Party leadership and tensions eased. Gomułka was forced to retire. After his death in 1982 of cancer, his negative image in Communist propaganda was modified and some of his constructive contributions were recognized. His memoirs were first published in 1994.