The nine Chief Justices of the court were split seven to two in favour of the ruling, which political commentators have called a “stunning” legal defeat for the President.
But in a separate decision, the court ruled that the US Congress could not see a significant proportion of Mr Trump’s tax returns.
New York prosecutors investigating Mr Trump’s financial history believe the information they subpoenaed from the President’s accountants and bankers could reveal serious conflicts of interest - as well as whether he has fully paid his taxes.
Investigators are also seeking records that clarify what, if any, role the Trump Organisation had in funding hush money payments to porn star Stormy Daniels and Playboy model Karen McDougal, in the run up to the 2016 election.
Mr Trump’s lawyers had fought the subpoenas all the way to the Supreme Court, arguing that, as President, he was immune from all criminal proceedings and investigations while in office.
Chief Justice John G. Roberts Jr, who wrote the majority opinion in both decisions, said that “no citizen, not even the president, is categorically above the common duty to produce evidence when called upon in a criminal proceeding.”
Conservative-leaning Chief Justices, Clarence Thomas and Samuel A. Alito, both dissented from the opinion, but the two Trump-appointed judges, Neil Gorsuch and Brett Kavanaugh, sided with the majority.
The firms named in the subpoenas have indicated that they will now comply with the ruling.
Reacting to the ruling on Twitter, the President attacked the Supreme Court: “This is a political prosecution.
“Courts in the past have been given ‘broad deference’. BUT NOT ME!” he added.
The New York Times called the landmark decision a “stunning defeat” for Mr Trump, and a “major statement on the scope and limits of presidential power.”
Cyrus Vance, the Manhattan district attorney in charge of the New York investigation into the President’s finances, called the ruling “a tremendous victory for our nation’s system of justice.”
“Our investigation, which was delayed for almost a year by this lawsuit, will resume, guided as always by the grand jury’s solemn obligation to follow the law and the facts, wherever they may lead,” Mr Vance added.
But despite being a victory for Mr Vance and his team, it is unlikely that the public will be able to see Mr Trump’s tax returns before the presidential election in November.
Records will probably be shielded from public scrutiny under secrecy rules involved in grand jury proceedings.
Back in 2016, facing pressure to make his tax returns public, as is customary for US presidential nominees, then-candidate Trump said an Inland Revenue Service (IRS) audit was preventing him from doing so.
But tax specialists in America have long argued that there is nothing to stop someone releasing their tax returns while under IRS audit.
Prosecutors in New York are also investigating whether reimbursements given to Mr Trump’s personal lawyer, Michael Cohen, by Mr Trump and his company violated campaign finance laws.
In the run up to the 2016 election, Mr Trump directed Mr Cohen to pay American porn actress Stormy Daniels $130,000.
The money was intended to prevent her from publicly disclosing an alleged affair she had with the billionaire in 2006.
At the same time, Mr Cohen was also involved in payments made to Karen McDougal, a model and actress, who also alleges that she had an affair with Mr Trump in 2006.
Mr Trump married his current wife, Melania Trump, in 2005. He has always denied having affairs with Ms Daniels and Ms McDougal.
A message from the Editor
Thank you for reading this story on our website. While I have your attention, I also have an important request to make of you.
The dramatic events of 2020 are having a major impact on many of our advertisers - and consequently the revenue we receive. We are now more reliant than ever on you taking out a digital subscription to support our journalism.
By supporting us, we are able to support you in providing trusted, fact-checked content for this website.