Parliament must vote on whether the UK can start the process of leaving the EU, the High Court has ruled.
This means the government cannot trigger Article 50 of the Lisbon Treaty - beginning formal exit negotiations with the EU - on its own.
Theresa May says the referendum - and existing ministerial powers - mean MPs do not need to vote, but campaigners called this unconstitutional.
The government is appealing, with a further hearing expected next month.
- Rolling reaction to Article 50 court ruling
- Kuenssberg: Will this mean early election?
- The High Court's judgement in full
- Brexit: All you need to know
Labour leader Jeremy Corbyn urged the government "to bring its negotiating terms to Parliament without delay", adding that "there must be transparency and accountability to Parliament on the terms of Brexit".
UKIP leader Nigel Farage said he feared a "betrayal" of the 51.9% of voters who backed leaving the EU in June's referendum and voiced concern at the prospect of a "half Brexit".
BBC assistant political editor Norman Smith said, if the court's decision was not overturned, there could be delays with potentially "months and months" of parliamentary hurdles.
But there was not yet "clarity" - if the judgement was not overturned - on whether there would be a "short, sharp" vote or whether Parliament would have to consider complex legislation, he added.
He predicted that, although a majority of MPs had backed the Remain campaign, most would ultimately be likely to vote for Article 50, as Brexit had been supported in the referendum.
The prime minister has said she will activate Article 50, formally notifying the EU of the UK's intention to leave, by the end of next March.
The other 27 member states have said negotiations about the terms of the UK's exit - due to last two years - cannot begin until Article 50 has been invoked.
Investment manager Gina Miller, who brought the case, said outside the High Court that the government should make the "wise decision of not appealing".
She said: "The result today is about all of us. It's not about me or my team. It's about our United Kingdom and all our futures."
Analysis - BBC political correspondent Eleanor Garnier
It is one of the most important constitutional court cases in generations. And the result creates a nightmare scenario for the government.
Theresa May had said she wanted to start Brexit talks before the end of March next year but this ruling has thrown the prime minister's timetable up in the air.
Campaigners who brought the case insist it was about "process not politics", but behind the doors of No 10 there will now be serious head-scratching about what the government's next steps should be.
This decision has huge implications, not just on the timing of Brexit but on the terms of Brexit. That's because it's given the initiative to those on the Remain side in the House of Commons who, it's now likely, will argue Article 50 can only be triggered when Parliament is ready and that could mean when they're happy with the terms of any future deal.
Of course, it will be immensely difficult to satisfy and get agreement from all those MPs who voted to remain. Could an early general election be on the cards after all?
But a government spokesman announced it would contest the ruling, in the Supreme Court.
He said: "The country voted to leave the European Union in a referendum approved by Act of Parliament. And the government is determined to respect the result of the referendum. We will appeal this judgement."
Government lawyers had argued that prerogative powers were a legitimate way to give effect "to the will of the people".
Nigel Farage says he is worried Brexit will be watered down after the High Court ruling
But the Lord Chief Justice, Lord Thomas of Cwmgiedd, declared: "The government does not have power under the Crown's prerogative to give notice pursuant to Article 50 for the UK to withdraw from the European Union."
Calling the case "a pure question of law", he said: "The court is not concerned with and does not express any view about the merits of leaving the European Union: that is a political issue."
Reacting to the ruling, International Trade Secretary Liam Fox told the House of Commons the government was "disappointed" but remained "determined to respect the result of the referendum".
'Give people a chance to say no'
He added: "There will be numerous opportunities for the House to examine and discuss what the government is negotiating.
"When we are clear about the position we will adopt, then Article 50 will be triggered but, given the nature of the judgement this morning, we will now have to await the government's appeal to the Supreme Court."
Mr Farage said: "We are heading for a half Brexit."
He added: "I worry that a betrayal may be near at hand... I now fear that every attempt will be made to block or delay the triggering of Article 50. If this is so, they have no idea of the level of public anger they will provoke."
Mr Corbyn said: "This ruling underlines the need for the government to bring its negotiating terms to Parliament without delay. Labour respects the decision of the British people to leave the European Union. But there must be transparency and accountability to parliament on the terms of Brexit."
But Liberal Democrat leader Tim Farron, a supporter of remaining in the EU, said: "Ultimately, the British people voted for a departure but not for a destination, which is why what really matters is allowing them to vote again on the final deal, giving them the chance to say no to an irresponsible hard Brexit that risks our economy and our jobs."
Source: BBC News
Additional videos at source. Personally, I think it's incredibly rich of Nigel "£350m for the NHS" Farage to speak of betrayal of terms.