The administration of French President Emmanuel Macron declared last month that it was outlawing the abaya in schools because it violated the laws governing educational secularism.
Muslim headscarves are already prohibited because they serve as a sign of religious affiliation.
A Muslim advocacy group requested an injunction against the prohibition on the abaya and the qamis, its male counterpart attire, before the State Council, France's highest court, for complaints against state officials.
The association said the ban was discriminatory and could incite hatred against Muslims as well as racial profiling.
But after examining the motion, filed by the Action for the Rights of Muslims (ADM), for two days, the State Council rejected the arguments.
It said wearing the abaya "follows the logic of religious affirmation", adding that the decision was based on French law, which did not allow anyone to wear visible signs of any religious affiliation in schools.
The ban by the government did not, it said, cause "serious or obviously illegal harm to respect for personal lives, freedom of religion, the right to education, the well-being of children, or the principle of non-discrimination".
Ahead of the ruling, France's Council of the Muslim Faith (CFCM), established to represent Muslims before the government, had warned that banning the abaya could create "an elevated risk of discrimination" and said it was considering putting its own complaint before the State Council.
The absence of "a clear definition of this garment creates vagueness and legal uncertainty", it said.
ADM's lawyer, Vincent Brengarth, argued during the court hearing that the abaya should be considered a traditional garment, not a religious one.
He also accused the government of seeking political advantage with the ban.
ADM president Sihem Zine said the rule was "sexist" because it singles out girls and "targets Arabs".
But the education ministry said the abaya made its wearers "immediately recognisable as belonging to the Muslim religion", and therefore ran counter to France's secular culture.
French schools sent dozens of girls home for refusing to remove their abayas on the first day of the school year on Monday.
Nearly 300 schoolgirls defied the ban, Education Minister Gabriel Attal said.
Most agreed to change garments, but 67 refused and were sent home, he said.
In 2016, the State Council overturned a ban in a French Riviera resort against the burkini, saying it failed to see any threat to public order from the long bathing suit worn by some Muslim women.
Around 10 percent of France's 67 million inhabitants are Muslim, according to official estimates.
Most have origins in the northern African countries of Algeria, Morocco, and Tunisia, which were French colonies until the second half of the 20th century.