The injunction, granted to Harlow Council and Essex County Council, makes it an offence for the named people to set up unauthorised encampments anywhere in Harlow.
It converts an interim injunction into a final injunction, which also protects 321 sites across the town – including parks, playgrounds, schools, cycle tracks and private land – from unapproved camps by anyone.
The councils said they had been blighted with more than 100 unauthorised encampments over less than 18 months.
Harlow Council leader Jon Clempner said the situation in the town from October 2013 to March 2015 required an unprecedented solution.
"The existing everyday powers available to us simply didn’t resolve the situation as we continued to play a game of cat and mouse," he said.
"Harlow is a tolerant place, but our communities quite rightly don’t want to see a repeat of persistent anti-social behaviour, and the impact unauthorised traveller encampments had on the settled community and our green open spaces.
"Months and months of hard work and building a strong case leading up to the interim injunction and the preparation and planning for the final injunction hearing has all paid off today.
"This injunction is about upholding the law, responding and listening to the concerns of residents and businesses, and protecting the town’s vulnerable open spaces. It is not – and never has been – about persecuting any particular group of people or their way of life."