Education secretary Damian Hinds has told ITV News LGBT protests "have to stop" outside a Birmingham primary school.
In defiance of the ban, demonstrators vowed on Monday to carry out a fresh protest later this week away from the school gates and will challenge the injunction in court.
Criticising "clear misinformation" from some protesters, Mr Hinds said children and teachers should be able to go to school without having to pass protesters.
Mr Hinds made it clear sex education is not compulsory until secondary school but said: "All children of all ages should know about relationships and should be respectful of other people's relationships".
Some Muslim parents feel including LGBT lessons contradict their religious beliefs.
Mr Hinds, raised as a Catholic, said: "I happen to have a faith which has love at its heart, actually, and I think that's true for people of faith in general as it is for people who don't have any faith.
"Of course different religions have their own different traditions and in this country we have diversity in our school system, including faith schools.
"Religion itself is one of the so-called protected characteristics, we respect the fact that people do come from different faith backgrounds. But the law of the land is the law of the land.
"Diversity and equality are a matter of fact and a matter of law and it's right that we respect that in schools."
Teachers have reported frustrations over "vague" guidelines, which some say do not clearly instruct schools to give lessons relating to LGBT.
Mr Hinds fell short of definitively requiring primary schools to provide teaching about LGBT equality and did not directly say what teacher guidance means in practice.
However, he did say: "I'm entirely clear all children of all ages should know about relationships and should be respectful of other people's relationships."
"You're never too young to learn", he added, when it comes to "understanding" and "respect for others".
Children at school may have two mothers or two dads, Mr Hinds said, which is "just a fact of life in modern Britain".
What does the interim injunction cover and why was it made?
Birmingham City Council applied for an injunction after several weeks of protests outside Anderton Park Primary School.
The interim injunction covers the streets immediately surrounding the school and stops protesters printing or distributing leaflets and inviting others to protest.
It’s also forbidden to encourage people to congregate at the school entrance.
According to the order, which has been published on the council’s website, social media cannot be used to make offensive or abusive comments about staff.
Those protesting against LGBT teachings will have a chance to make their case to a judge on June 10.
Demonstrators had continued to gather outside the school in Dennis Road despite criticism from authorities including the council and police.
The head teacher announced the site would close for half term early last week over safety fears.
How has the school responded?
A spokesman for NAHT, the trade union serving school leaders, welcomed the decision to grant the injunction.
He said: “Credit is due to Birmingham City Council for supporting the school in seeking the exclusion order.
“The important thing now is for the Government to give clarity so that no more schools are faced with the kind of demonstrations that we have seen in Birmingham.”
Anderton Park head teacher Sarah Hewitt-Clarkson told BBC2’s Newsnight: “It’s a step forward from a judge who has looked at the evidence and said that it [the protest] doesn’t appear to be peaceful.
“This is causing harm and distress.”