Human rights activists have condemned the law put forward by Hungarian Prime Minister Viktor Orban's right-wing government.
Hundreds gathered outside parliament to protest the move, which passed with 140 members voting for and 21 against.
The Orban government claims that the legislation defends traditional family values and protects children.
The amendment declares that children's rights to moral, physical and spiritual development supersede any right other than the right to life, including the right to peacefully assemble.
The amendment also gives the government the power to temporarily suspend the citizenship of any Hungarian dual nationals who are deemed a threat to the country's security or sovereignty.
Opposition Momentum MP David Bedo told the BBC that "it's not just about pride, it's about any assembly that is organised by the opposition.
"This is only the first step they're taking in this one-year campaign, and we are going to see many more laws enacted and passed in parliament that is very much against any democracy or any rule of law," he added.
Government spokesperson Zoltan Kovacs wrote on X that the government viewed the changes as a "constitutional safeguard against ideological influences that they argue threaten the well-being of children, particularly in the context of events like Pride parades".
The amendments come after the Orban government passed a law that banned pride marches.
Prime Minister Viktor Orban has criticised LGBTQ+ people and pledged to crack down on foreign funding of independent media, opposition politicians and NGOs in Hungary in recent weeks, stepping up his campaign ahead of elections due early next year.
Orban, a nationalist who faces an unprecedented challenge from a new surging opposition party, has scaled up his attacks on the media and LGBTQ+ people since the inauguration of US President Donald Trump.
"The proposed bill amends the law governing the right of assembly by stipulating that it is banned to hold an assembly that violates the ban set out in the law on the protection of children," the legislation says.
It also says police can use face recognition cameras to identify people who attend the event in which participants march down Andrassy Avenue, a wide street in Budapest's city centre.
Orban has said Pride should not even bother to organise the event this year.
At the time the bill was put forward, festival organisers, who say it poses no threat to children, responded by saying that freedom of assembly was a constitutional right.
"Despite the proposed amendment to the law, we plan to hold Budapest Pride," Pride organisers told Reuters via email, adding that there was a bigger need than ever for the march and that they would not be silenced.
Budapest's liberal mayor Gergely Karacsony said in a Facebook post that the Pride march will be held this year and will maybe be bigger than ever.
However, since the constitutional change, Budapest Pride organisers have not commented on whether the event will proceed in 2025.
Orban, in power since 2010, promotes a Christian-conservative agenda and, in 2021, banned what it calls the "promotion of homosexuality" among under-18s despite strong criticism from rights groups and the European Union.
The 2021 law has caused anxiety among gay, bisexual and transgender Hungarians, and the European Commission referred Hungary to the EU's Court of Justice over it in 2022.
With AAP.