About half the school's roughly 700 pupils are Muslim, the court previously heard. Students are expected to adhere to strict rules including focusing on teachers extensively during lessons and remaining silent in corridors, as well as observing restrictions on uniforms.
In March 2023, up to 30 students began praying in the school's yard, using blazers to kneel on, the High Court heard.
The school introduced the ban in the same month due to concerns about a "culture shift" towards "segregation between religious groups and intimidation within the group of Muslim pupils", the court was told.
Michaela is a free school and is therefore independent of the local authority, Brent Council, and exempt from teaching the national curriculum.
The case will be seen as upholding the right of non-religious schools to make their own decision about whether to set aside time and space for pupils to pray.
Ms Birbalsingh, a former government social mobility tsar, said in a statement on X, formerly Twitter, that a school "should be free to do what is right for the pupils it serves".
She added: "Schools should not be forced by one child and her mother to change its approach simply because they have decided they don't like something at the school.
"If parents do not like what Michaela is, they do not need to send their children to us."
Following the ruling, the student said in a statement that she was "disappointed".
"As is set out in the judgment, I do not agree that it would be too hard for the school to accommodate pupils who wished to pray in the lunch break," she said.
"The school is very well run and generally very good at managing everything. The school doesn't wish to allow pupils to pray, has chosen a different path and the judge has found in their favour.
"Even though I lost, I still feel that I did the right thing in seeking to challenge the ban. I tried my best, and was true to myself and my religion."
She said she planned to remain at the school and focus on her GCSE exams.
"I am grateful for the understanding that my non-Muslim friends at school have shown as to the issues that affect us," she added.
In the legal action against the north-west London school's governing body, the Michaela Community Schools Trust, the student alleged that the ban on prayer rituals breached her right to freedom of religion.
The school argued its prayer policy was justified after it faced death and bomb threats linked to religious observance on site.
The pupil, who cannot be named for legal reasons, told the court the policy had "fundamentally changed" how she felt "about being a Muslim in this country".
Lawyers for the pupil told the judge at a hearing in January that she was making a "modest" request to be allowed to pray for about five minutes at lunchtime, on dates when faith rules required it, but not during lessons.
Representing the student, Sarah Hannett KC told the court that the school's policy had the "practical effect of only preventing Muslims from praying, because their prayer by nature has a ritualised nature rather than being internal".
Dismissing the student's case, Mr Justice Linden said: "She knew that the school is secular and her own evidence is that her mother wished her to go there because it was known to be strict.
"She herself says that, long before the prayer ritual policy was introduced, she and her friends believed that prayer was not permitted at school and she therefore made up for missed prayers when she got home."
The judge upheld the student's challenge to a decision to temporarily exclude her from the school.
Education Secretary Gillian Keegan said: "I have always been clear that head teachers are best placed to make decisions in their school.
"Michaela is an outstanding school and I hope this judgment gives all school leaders the confidence to make the right decisions for their pupils."
The student's mother said she was "dismayed" by the High Court's ruling.
She added: "My daughter's impassioned stance compelled me to support her, and I stand firm in that decision.
"Her courage in pursuing this matter fills me with pride, and I'm confident she's gained invaluable lessons from the experience."