The two have clashed over their views on climate change, defence and Trump's anti-globalisation "America First" policy, and in an interview Wednesday Merkel criticised the United States for its focus on protectionism instead of cooperation.
However, she added that differences should not be pushed under the table.
Merkel says even though not everybody sees eye-to-eye on matters, "globalization can be a win-win situation; it must not always be that there are winners and losers".
While counter-terrorism and economic reforms will dominate the discussions, the 12th G20 Summit will also discuss issues like free and open trade, climate change, migration, sustainable development and global stability.
Sixty-four percent of the Democrats said they have more faith in Merkel while 89 percent of the Republicans opted for Trump.
The protesters say the G20 has failed to solve numerous issues threatening world peace, including climate change, worsening inequality, and violent conflicts.
"Whoever believes the problems of this world can be solved by isolationism and protectionism is making a tremendous error", Ms Merkel said last week. But Hamburg is the chancellor's hometown, and she is trying to show the world that protests are tolerated in a democracy. German Interior Minister Thomas de Maiziere estimates that the number of protesters prepared to use violence stands at about 8,000.
Officers said the unrest then spread to other areas of the city.
A little later, shortly before midnight, police used water cannon and pepper spray to disperse rallies of several hundred people who had started blocking roads in various locations, in particular the Sankt-Pauli neighbourhood.