The decision comes just days before a meeting of the UN's cultural organisation Unesco, which had proposed to add Venice to its list of endangered heritage sites.
"The decree adopted today represents an important step for the protection of the Venetian lagoon system," Italy's Prime Minister Mario Draghi said after the decree was approved at a cabinet meeting.
He added that there would be money to mitigate the impact on employment.
As part of the move, the biggest ships will be diverted to the city's industrial port of Marghera.
However, this is viewed as only a temporary solution, with ministers calling for ideas on a new permanent terminal.
The passengers aboard cruise ships provide a huge economic boost to Venice, but many residents say the giant floating hotels should not sail past the iconic St Mark's Square.
They warn the ships cause large waves that undermine the city's foundations and harm the fragile ecosystem of its lagoon.
The debate was reignited by the return last month of cruises after the coronavirus pandemic, when the throngs of tourists that normally fill the streets stayed away.
Venice was put on Unesco's heritage list in 1987 as an "extraordinary architectural masterpiece", but the body warned last month of the need for a "more sustainable tourism management".
After years of debate, Italian Culture Minister Dario Franceschini said the government had decided to act now "to avoid the real risk of the city's inclusion on the endangered world heritage list".
"From August 1, large ships will no longer be able to reach Venice through the St Mark's Basin, the St Mark's Canal or the Giudecca Canal," Infrastructure Minister Enrico Giovannini said.
There would be compensation for those who lost out from the move and €157 million ($185 million) was being invested in the Marghera port.
He said the ban was a "necessary step to protect the environmental, landscape, artistic and cultural integrity of Venice".
It will only apply to the biggest ships, with those carrying about 200 passengers viewed as "sustainable" and still allowed into the centre.
Those that fulfil any of four criteria will be banned: weighing more than 25,000 tonnes, measuring more than 180 metres long, more than 35 metres high or producing more than 0.1 percent sulphur.
The vice-president of tourism association Confturismo, Marco Michielli, said the new law represented a "good compromise".
"The Marghera solution would maintain port activity in Venice, on the one hand safeguard jobs and activities, and on the other free up the Giudecca Canal on the other," he said.
The issue of cruise ships in Venice has sparked global debate, and last month celebrities and cultural figures including Mick Jagger, Francis Ford Coppola and Richard Armstrong, director of the New York's Solomon R. Guggenheim Museum, issued a call for action.
In an open letter to the Italian government calling for a range of measures to better protect the city, they warned the historic site risked being "swept away" by cruise ships.