Trump said he chose to back out of the G7 communique after watching Trudeau's closing summit news conference, at which he warned that Canada would not be pushed around on tariffs - a point the Canadian prime minister had made several times before.
Trump said he was surprised to watch Trudeau's press conference aboard Air Force One as he flew to Singapore.
The president said that Canada, Mexico and the European Union have taken advantage of an global trading system, benefiting from low US tariffs while imposing high trade barriers of their own.
Trudeau said at the press conference that Canada would not be "pushed around" by the United States.
Trudeau said he had reiterated to Trump, who left the G-7 meeting before it ended, that tariffs would harm industries and workers on both sides of the U.S. "Canada has stood with the United States in every modern war and crisis". You should ask Prime Minister Abe.More news: Cristiano Ronaldo Furious With Real Madrid's Latest Offer
In a string of angry tweets, Trump said the U.S. paid "close to the entire cost of Nato" to help protect countries that "rip us off on trade".
The outburst against Trudeau, and by association the other G7 members, is only the latest incident in which Trump has clashed with America's closest allies, even as he has had warm words for autocrats like Kim and Russia's Vladimir Putin.
The House of Commons unanimously supported to a motion presented by New Democratic Pary (NDP) MP Tracey Ramsey, condemning the USA actions given the "longstanding, mutually-beneficial trading relationship". "The problem was that in conveying that message I used language that was inappropriate".
"Now, those of us from ME are very aware that there have been frictions", she said, adding: "Those issues deserve attention, but we don't need to alienate Canada in the process". "He'll learn, he can't do that", Trump said.
In reality, the United States has a small surplus with Canada when goods and services are considered - $341.2 billion to Canada's $325.9 billion, according to 2016 statistics from the US trade representative.
"It would be with regret but it would be with absolute clarity and firmness that we move forward with retaliatory measures on July 1, applying equivalent tariffs to the ones that the Americans have unjustly applied to us", said Trudeau.
"We finished the (G7) meeting and really everybody was happy".
Ten per cent of the Canadian dairy market is open to imports, with the rest effectively blocked by massive tariffs. "It was very friendly", Trump said. National Economic Council Director Larry Kudlow also lambasted the Canadian prime minster during a CNN interview on Sunday.