The law has also been condemned for conflating pedophilia and pornography with LGBT+ education.
Orban says the new law is a child-protection issue and he told state radio on Friday that the EU infringement action "is legalized hooliganism... the European Commission's stance is shameful."
He said the debate offered Hungarians a glimpse into "European life," into what went on in schools in Germany, saying Hungary would not let activists "march up and down" in schools promoting what he called sexual propaganda.
Rights groups have rallied against the Hungarian government's legislation.
The commission's infringement action has also targeted Poland after some municipalities there declared themselves "LGBT-ideology free zones".
Both countries are being written to by the Commission and will have two months to respond – after that, the Commission may refer them to the EU's Court of Justice.
Orban is a nationalist who has often clashed with the European Commission. The anti-LGBT+ campaign looks likely to feature prominently on his political platform ahead of national elections next year.