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.
The prime minister's spokeswoman said she would be calling President of the EU Commission Jean-Claude Juncker to say she intended to stick to her March 2017 deadline for triggering Article 50.
Amid suggestions that she might try to call an early general election, she added that Mrs May believed "there shouldn't be an election until 2020 and that remains her view".
A statement is to be made to MPs on Monday but the government says it has no intention of letting the judgement "derail Article 50 or the timetable we have set out".
Brexit Secretary David Davis said he presumed the court ruling meant an act of Parliament would be required to trigger Article 50 - so would be subject to approval by both MPs and peers.
But the government was going to contest that view in an appeal, and said the referendum was held only following "a six-to-one vote in the Commons to give the decision to the British people".
"The people are the ones Parliament represents - 17.4m of them, the biggest mandate in history, voted for us to leave the European Union. We are going to deliver on that mandate in the best way possible for the British national interest," he told the BBC.
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".
But 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 the court ruling could mean potentially "months and months" of parliamentary hurdles but said a majority of MPs would be likely to vote for Article 50 - despite having backed the Remain campaign - as Brexit had been supported in the referendum.
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?
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."
Government lawyers had argued that prerogative powers were a legitimate way to give effect "to the will of the people".
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."
The three judges looking at the case found there was no constitutional convention of the royal prerogative - powers used by ministers - being used in legislation relating to the EU.
They added that triggering Article 50 would fundamentally change UK people's rights - and that the government cannot change or do away with rights under UK law unless Parliament gives it authority to do so.
Calling the case "a pure question of law", Lord Thomas 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."
Former attorney general Dominic Grieve told the BBC he believed there was time for the government to get legislation through Parliament before the end of March, should they lose the appeal.
He added: "It will certainly allow the opportunity to debate the issues surrounding Brexit but it is worth bearing in mind that it's a bit difficult to fetter the government as to what it should do after Article 50 is triggered because actually, what the government can deliver ... is entirely dependent on the negotiating position of the 27 other member states... So you can't really order the government to stay in the single market because that may not be something that the government can deliver."
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".
What the ruling says
- It is a fundamental principle of the UK constitution that Kings' or Queens' powers cannot be used by the government via the Royal Prerogative to change or do away with rights under British law unless Parliament gives it authority to do so. The court looked at examples ranging from the 1600s to the 1970s Laker Airways legal battle
- Parliament had a vote on the UK joining the European Union back in the 1970s, so there is no convention of the Royal Prerogative being used in legislation relating to the European Union
- Allowing MPs a vote on the final Brexit deal at the end of the negotiations would not amount to parliamentary approval because once Article 50 is triggered there is no way that the UK will not leave the EU, and in doing so existing laws will be changed
- David Davis points out that MPs voted by six to one for the referendum to be held, but the judgement says that the referendum bill, and background briefings, made clear that the referendum was advisory rather than mandatory. So even though MPs voted for the referendum, the way it was worded did not hand over the authority to trigger Article 50, in its view
But UKIP's 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."
Labour leader 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 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."
Addressing suggestions that Mrs May could call a general election before 2020 - when the next election is scheduled to take place under the Fixed Term Parliaments Act - Scotland's First Minister Nicola Sturgeon said: "If you're asking me do I think today's judgement makes a general election more likely than it was yesterday, I think the answer to that is probably yes."
The UK voted by 52% to 48% to leave the European Union in a referendum on 23 June.
The EU's 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.