Currently, most Hungarian universities are owned by the state but have a large amount of academic autonomy.
The bill, drafted by Prime Minister Viktor Orban's deputy, says the universities need to be reorganized and run by foundations because modern conditions require a "re-thinking of the role of the state" and the foundations will manage institutions more efficiently.
Orban's Fidesz party, which has a two-thirds majority in parliament, voted for the legislation on Tuesday.
His government will appoint boards of trustees to run the foundations, which will control substantial real estate assets and benefit from billions of euros worth of EU funds, while also having considerable influence over universities' everyday life.
The government will endow several of the foundations using its stakes in blue chip companies MOL and Richter. It will also allocate over 1 trillion forints ($3.3 billion) in EU recovery funds for the revamp of universities.
"You are planning to give away the remains of the nation's wealth to these foundations for free," opposition MP Erzsebet Schmuck from the LMP party said in parliament on Monday.
In reply, Orban said state-run universities were not being privatized and that his government was investing in higher education by giving these foundations substantial assets.
Orban, who came to power in 2010, has tightened his control over much of Hungarian public life, such as the media, education and scientific research.
His government, promoting what it calls Christian, conservative values, has strongly opposed immigration and limited gay adoption and legal recognition of transgender people.
Critics say the new legislation is a government power grab aimed at extending its ideological influence.
Attila Chikan, a professor at the Corvinus economics university in Budapest and a former minister in Orban's first government in 1998, said the move was part of an "ideological war" declared by the prime minister.
"They make it no secret: they want to assume intellectual power after political and economic power."
He noted the move came after the government boosted controls over academic research and forced a top liberal school, Central European University, to move to Vienna in 2019.
The bill says "the fundamental expectation is that the foundations actively defend the survival and well-being of the nation and the interests of enriching its intellectual treasures."
The foundations running some of the cultural institutions would be tasked with "strengthening national identity."
The opposition said with supporters of Orban's ruling Fidesz party, and even government ministers, sitting on the boards, Orban could retain a degree of control over universities beyond the 2022 election and could undermine their autonomy.
Gergely Arato, an MP from opposition party Democratic Coalition, said the bill would take away "the property, traditions, community, knowledge" of Hungarian people and give them to government allies controlling the universities.
The government says universities would benefit from the new model. Istvan Stumpf, government commissioner in charge of the changes, declined an interview with Reuters.
In October, students at Hungary's University of Theatre and Film Arts blockaded their school in a row over the imposition of a government-appointed board that protesters said undermined the school's autonomy.