The three judges agreed with 16-year-old Shabina Begum's argument that the ban violated her right to religious freedom under the European Convention on Human Rights, and that she had been sent home from school unlawfully.
The judges overturned last year's High Court ruling that Denbigh High School in Luton, north of London, was entitled to bar Begum from wearing the gown, called a jilbab.
The place of religion — and particularly of Islamic dress — in public schools has become a thorny political issue in Europe. France last year bannedlike Muslim head scarves from state schools. Britain takes a different view, allowing individual schools to decide what forms of dress are appropriate.
Begum, who was represented in the high-profile case by Cherie Booth, wife of Prime Minister Tony Blair, called Wednesday's judgment "a victory for all Muslims who wish to preserve their identity and values despite prejudice and bigotry."
Begum was sent home from Denbigh High School in Luton, north of London, in September 2002 for wearing the jilbab. She has not attended the school since.
School officials argued the jilbab posed a health and safety risk, and might cause divisions among pupils, with those who wore traditional dress being seen as "better Muslims" than others.
Four-fifths of Denbigh's 1,000 pupils are Muslims. The school denies acting in a discriminatory manner and says it has a flexible school uniform policy that takes into account all faiths and cultures. Pupils are allowed to wear trousers, skirts or a traditional shalwar kameez, consisting of trousers and a tunic, and female pupils may wear head scarves.
Begum's appeal of a High Court ruling against her last June cited Article 9 of the European Convention on Human Rights, which guarantees "freedom to manifest one's religion or beliefs."
At a hearing last December, attorney Booth argued the High Court ruling meant the school was entitled to "pick and choose" which religious beliefs it accepted. Booth was not in court Wednesday.
After the ruling, Begum said the school's decision was "a consequence of an atmosphere that has been created in Western societies post 9/11, an atmosphere in which Islam has been made a target for vilification in the name of the `war on terror'."
"It is amazing that in the so-called free world I have to fight to wear this attire," she added.
The school defended its uniform policy Wednesday, saying it had lost the appeal on a technicality.
"Denbigh High is a multiracial, multi-faith school with a uniform policy that takes into account the cultural and religious sensitivities of pupils at the school," it said in a statement.
Luton Borough Council, which oversees schools in the area, said it would advise schools to review their uniform policies, "taking into account the religious and cultural needs of pupils."
The judges called on the government to give schools more guidance on how to comply with their human rights obligations to students.
The Court of Appeal said Wednesday that Begum had moved from Denbigh to a new school and would not seek financial damages. The school, however, was ordered to pay her legal costs.