It was unclear, as Trudeau headed back to Canada from Florida, whether the conversation had alleviated Trump's concerns.
A person familiar with the details of the leaders' hastily arranged meeting on Friday night said it was a "positive wide-ranging dinner that lasted three hours".
The official, who was not authorised to discuss the matter publicly and spoke to the Associated Press on condition of anonymity, said topics included trade, border security, fentanyl, defence, Ukraine, NATO, China, the Middle East and pipelines as well as a G7 meeting in Canada next year.
A photo of Trudeau sitting next to Trump during dinner was posted on X by Pennsylvania senator-elect Dave McCormick.
The Republican president-elect has threatened to impose tariffs on products from Canada and Mexico if the governments there do not stop what he called the flow of drugs and migrants across their borders.
Honored to have dinner with — Dave McCormick (@DaveMcCormickPA) @realDonaldTrump and to celebrate two big wins in PA! Ready to join him in Washington to shake things up and fight for every single Pennsylvanian! pic.twitter.com/uKap3kkUkxNovember 30, 2024
He said he would impose a 25 per cent tax on all products entering the US from Canada and Mexico as one of his first executive orders when he takes office in January.
As he was leaving his West Palm Beach hotel, Trudeau stopped briefly to answer a reporter's question about the dinner meeting, saying it was "an excellent conversation".
Trump's transition team did not respond to questions about what the leaders had discussed.
Trump, during his first term as president, once called Trudeau "weak" and "dishonest" but it was the prime minister who was the first G7 leader to visit Trump since the November 5 election.
"Tariffs are a crucial issue for Canada and a bold move was in order. Perhaps it was a risk, but a risk worth taking," Daniel Béland, a political science professor at McGill University, said.
Among those at the dinner were Howard Lutnick, Trump's pick for commerce secretary; North Dakota governor Doug Burgum, in line to lead the Interior Department; and Mike Waltz, Trump's choice to be his national security adviser.
Accompanying Trudeau were Canada's public safety minister Dominic LeBlanc, whose responsibilities include border security, and Katie Telford, Trudeau's chief of staff.
Trudeau had said earlier on Friday that he would resolve the tariffs issue by talking to Trump.
Mexican President Claudia Sheinbaum said a day earlier after speaking with Trump that she is confident a tariff war with the United States will be averted.
Trudeau said Trump got elected because he promised to bring down the cost of groceries but now he is talking about adding 25 per cent to the cost of all kinds of products including potatoes from Prince Edward Island in Atlantic Canada.
To Nelson Wiseman, professor emeritus at the University of Toronto, Trump "doesn't need convincing that new tariffs on Canadian products would not be in US interests. He knows that but cannot say it because it would detract from what he has said publicly. His goal is to project the image that he gets action when he talks."
When Trump imposed higher tariffs during his first term in office, other countries responded with retaliatory tariffs of their own.
Canada, for instance, announced billions of new duties in 2018 against the US in a response to new taxes on Canadian steel and aluminium.
Canada is the top export destination for 36 US states.
Nearly $C3.6 billion ($A4.1 billion) worth of goods and services cross the border each day.