The President was asked by a German reporter why his White House had cited a Fox News report that claimed that the British surveillance agency GCHQ had been used to wiretap Trump Tower during the election campaign.
He did not apologize to the British government after it said that the report of UK surveillance was "ridiculous."
Turning to Merkel, who was angry to find out after leaks by Edward Snowden that the US National Security Agency had tapped her phone, Trump said "at least we have something in common".
Trump appeared to be irritated to be asked the question by the German reporter, in the latest twist of a two-week controversy ignited by early morning tweets by the President that claimed that President Barack Obama had ordered wiretaps against him last year.
Senior members of the intelligence committees in the House of Representatives and the Senate have said that there was no wiretapping of Trump Tower.
Trump also knocked NATO nations who do not pay their "fair share" for their defense,
He said that many nations owe "vast sums" of money in unpaid dues to the organization.
"These nations must pay what they owe," Trump said during the joint news conference between the two leaders.
The President, however, also expressed strong support for the NATO alliance after raising questions about its utility and relevance during his election campaign.
The German government fell well short of its NATO target of 2% last year, hitting 1.19%. Though it has committed to boosting defense spending this year, Germany will still fall short again.
Trump also said that the US would respect "historic institutions" in what may have been a reference to the European Union, which has always been seen by the US as a bulwark of Western security but about which senior figures in Trump's government have expressed skepticism.
In her remarks, Merkel also referred to past tensions with Trump, as she seeks to build a new relationship with the third US president she has encountered as German Chancellor.
"It's always much better to talk to one another than about one another," she said.
She also said she was glad to hear Trump's support for NATO and said that Trump had committed to the Minsk process, designed to monitor a ceasefire in Ukraine and look toward an eventual solution to the crisis.
Apart from the domestic political storms that are battering the White House, the news conference and Merkel's visit to the White House are coming at a crucial moment for US-German relations.
The German Chancellor is trying to forge a relationship with Trump despite suspicion over his political views. She congratulated the President after his election win in a statement that also contained a defense of Western values — amid concern in Germany that his stances on issues like immigration run counter to the principles that have sustained the Western alliance.
Germany, the most powerful political force in the European Union, has also been deeply concerned by Trump criticisms of NATO and deep skepticism inside the White House about the EU itself.
Friday's meeting will attempt to stir some personal chemistry between two leaders who seem far removed in temperament and instinct.
Merkel, who takes a cautious, analytical approach to politics, was also one of the few world leaders who appeared to forge a deep connection with Obama, with whom she was something of a kindred spirit.
Trump is more outspoken and improvisational and has little time for diplomatic niceties. He has, for example, heavily criticized Merkel's decision to allow hundreds of thousands of refugees into Germany, a move that is a key issue in her re-election race this year.
But both sides are likely to try to move on from past tensions. The pragmatic Merkel is now on her third US president and appears to be looking to find a way to forge a relationship with Trump without buying into his political values.
Another administration official said before the meeting that the President hoped to get Merkel's advice for dealing with Russian President Vladimir Putin, who, according to US intelligence, ordered cyber-meddling in last year's presidential election and tried to help Trump.
Merkel hoped to appeal to the President's focus on business, bringing with her to Washington the chief executives of Siemens and BMW with her to Washington.
The two companies employ thousands of American workers, a point Merkel hopes will come through when the pair get to discussing trade issues — including Germany's trade surplus, which has rankled the Trump camp.