Three senior judges of the high court in London ruled that Prime Minister May did not have the right to use her executive power to trigger Article 50 of the Lisbon treaty.
They ruled that Parliament must vote on whether the UK can start the process of leaving the European Union.
This effectively means May cannot trigger Article 50 of the Lisbon Treaty to begin formal discussions with the EU without getting the approval of House of Commons MPs.
May had argued the public referendum in favour of Brexit on June 23 and ministerial powers mean MPs do not need to vote, but campaigners had argued this was unconstitutional.
The government said it will appeal the court ruling in the Supreme Court.
“We will appeal this judgment,” said a statement from the prime minister’s office. “The country voted to leave the European Union in a referendum approved by Act of Parliament.”
The challenge had been brought by a group of businesses led by investment manager Gina Miller, whose lawyers argued that the government cannot trigger Article 50 of the Lisbon Treaty unilaterally despite a public referendum in favour of leaving the European Union.
“We have a Parliament that is sovereign. We have a functioning democracy. Are we now saying that we can go back to 19th-century, 18th-century politics where governments can overrule Parliaments and take away people’s rights, which will happen when we leave the EU. For me that is a very dangerous place to go,” Miller said.
Ministers argued they can act under ancient powers of Royal Prerogative, the preserve of monarchies. A judicial review of the issue in the high court was heard by the Lord Chief Justice of England and Wales, Lord Thomas, who announced their ruling on Thursday.
It has already been announced that any appeal will be fast-tracked to the Supreme Court to ensure a final judgement before the end of the year.
May has announced that she will activate Article 50, formally notifying the EU of the UK’s intention to leave, by the end of next March.
This follows the UK’s decision to back Brexit in June’s referendum by a margin of 51.9 per cent to 48.1 per cent.
The EU’s other 27 members have said negotiations about the terms of the UK’s exit - due to last two years – cannot begin until Article 50 has been invoked.
According to official government documents published recently, ministers believe the use of prerogative powers once held by the Sovereign but now residing in the executive to enact the referendum result is “constitutionally proper and consistent with domestic law”.
Their argument is that the “decision to withdraw from the EU is not justifiable. It is a matter of the highest policy reserved to the Crown”.
What the world must learn from Brexit
'Independence Day': Britain parts ways with EU
Is India prepared for Brexit?
After Brexit, what next?