Mr Johnson suspended - or prorogued - Parliament for five weeks earlier this month, but judges said it was wrong to stop MPs carrying out duties in the run-up to Brexit on 31 October.
Supreme Court president Lady Hale said "the effect on the fundamentals of democracy was extreme."
The PM said he "profoundly disagreed" with the ruling but would "respect" it.
Comment: He told reporters the following:
"I don't think this was the right decision." "I have the utmost respect for our judiciary," he said, adding: "I think that the prerogative of prorogation has been used for centuries without this kind of challenge."
"As the law currently stands, the UK leaves the EU on October 31 come what may," Johnson told reporters, and added that securing an exit deal with the bloc before that deadline "is not made much easier by this kind of stuff in parliament or in the courts."
A raft of MPs have now called for the prime minister to resign and some say they will attempt to force him out if he does not go of his accord.
'Undeterred'
Mr Johnson insisted he wanted to outline his government's policies in a Queen's Speech on 14 October, and to do that, Parliament must be prorogued and a new session started.
But critics said he was trying to stop MPs scrutinising his Brexit plans and the suspension was far longer than necessary.
During a speech in New York, the PM said he "refused to be deterred" from getting on with "an exciting and dynamic domestic agenda", and to do that he would need a Queen's Speech.
The court ruling does not prevent him from proroguing again in order to hold one, as long as it does not stop Parliament carrying out its duties "without reasonable justification".
A No 10 source said the Supreme Court had "made a serious mistake in extending its reach to these political matters", and had "made it clear that its reasons [were] connected to the Parliamentary disputes over, and timetable for" Brexit.
But Lady Hale emphasised in the ruling that the case was "not about when and on what terms" the UK left the EU - it was about the decision to suspend Parliament.
Delivering the justices' conclusions, she said: "The decision to advise Her Majesty to prorogue Parliament was unlawful because it had the effect of frustrating or preventing the ability of Parliament to carry out its constitutional functions without reasonable justification."
Lady Hale said the unanimous decision of the 11 justices meant Parliament had effectively not been prorogued - the decision was null and of no effect.
Speaker of the Commons John Bercow said MPs needed to return "in light of the explicit judgement", and he had "instructed the House of Commons authorities to prepare... for the resumption of business" from 11:30 BST on Wednesday.
He said prime minister's questions would not go ahead, but there would be "full scope" for urgent questions, ministerial statements and applications for emergency debates.




The king (queen) -institution is in existence only for this kind of decisions. Decisions that has to be made but are impossible for a parliamentary "representation" / rule of law.