The council sought a county court injunction last year to ban convicted drug dealer Matthew Zain, 17, from an estate but, after an interim ban was granted, a judge overruled it.
In overturning the county court judgment on Wednesday, Lord Justice Scheimann said, under the Local Government Act 2000 councils had the right to seek injunctions in the interests of people living in the community.
The council's barrister, David Matthias, said earlier in the hearing the estate was plagued by drug-related gang warfare and public dealing. Syringes littered the street, and many residents feared leaving their homes because of the sinister atmosphere.
Deputy leader Brian Parbutt (Lab) said the council was not seeking to usurp the police authority in dealing with criminals. But he added: 'We have no qualms about using civil law in issues involving harassment, public nuisance or other cases that may also lead to a criminal case being brought.'
The council is now considering taking out injunctions against other drug dealers and habitual criminals.