"I'm handing in my mandate, I'm resigning, and implicitly my government too," Ponta said in a statement on Wednesday. "I hope the government's resignation will satisfy the people who came out in the streets."
Ponta said he would stay on until a new government is in place.
President Klaus Iohannis will name a prime minister to form a new government, which needs to be approved by parliament.
If this fails twice, early elections will be called. Romania is scheduled to hold parliamentary elections in December 2016.
Deputy leader of the opposition Liberal Party, Catalin Predoiu, hailed the resignations. "This is a victory of the street. It is a lesson for all politicians," he said.
Large crowds
Cries of "shame on you" and "assassins" filled the streets of Bucharest as thousands of people rallied on Tuesday demanding cabinet resignations as the death toll from the fire at the Colectiv nightclub rose to 32.
Source: Agencies