Born at Bubiai in Kovno Governorate in 1901, Gedvilas family was deported to Russia for violation of the Lithuanian press ban in 1904. Gedvilas studied at the Saint Petersburg State Institute of Technology from 1919 to 1922. After returning to Lithuania he worked as a teacher in Palanga (1923–1927) and as a director of state patient fund in Telšiai (1928–1940). He was active in various left-wing political organizations and publications. For these activities he was briefly jailed several times by the authoritarian regime of Antanas Smetona.[ Troubles with the law enforcement brought Gedvilas closer to the communist activists. After the Soviet ultimatum in June 1940, Gedvilas became Minister of Internal Affairs in the People's Governmentand was elected to the People's Seimas. He helped to transition Lithuania into the Lithuanian Soviet Socialist Republic, thus legitimizing the Soviet occupation.
Gedvilas served as Chairman of the Council of People's Commissars of Lithuania (in 1946 renamed to the Council of Ministers) from August 25, 1940 to January 16, 1956 (equivalent to Prime Minister). In this capacity he signed off on persecution orders, including the mass deportation of Lithuanians into gulags and other forced settlements. From 1952 to 1956, he was a candidate to the Central Committee of the Communist Party of the Soviet Union. Gedvilas was demoted to Minister of Education due to tensions and political rivalry between him and Antanas Snieckus, the first secretary of the Lithuanian Communist Party. Gedvilas is credited for rebuilding a number of schools and introducing eleven-year secondary education.He retired from the ministry in 1973. Gedvilas was a delegate of the Supreme Soviet of the Lithuanian SSR in 1940–1975 and of the Supreme Soviet of the Soviet Union in 1941–1962.In 1975, he published a memoir book Lemtingas posukis (The Fateful Change), which was translated into Russian in 1979. The book contained essays and speeches regarding World War II (1940–1945).