Police fired teargas and stun grenades to hold back crowds chanting anti-austerity slogans and waving Nazi flags while Merkel's host, Prime Minister Antonis Samaras, welcomed her as a "friend" of Greece.
On her first visit to Greece since the eurozone crisis erupted three years ago, Merkel struck a conciliatory tone.
She reaffirmed Berlin's commitment to keep the debt-crippled Greek state inside Europe's single currency but offered Samaras no concrete relief ahead of a new report on Greece's reform progress due by next month.
"I have come here today in full knowledge that the period Greece is living through right now is an extremely difficult one for the Greeks and many people are suffering," Merkel said at a news conference with Samaras just a few hundred yards from the mayhem on Syntagma Square, outside parliament.
"Precisely for that reason I want to say that much of the path is already behind us," she added.
'Greek people are bleeding'
Samaras, who invited Merkel to Greece during a visit to Berlin in August, promised to press on with economic reforms necessary to restore confidence.
"The Greek people are bleeding but are determined to stay in the euro," he said. "They are not asking for more money or favours. They only want to get back on their feet as soon as possible and exit this recession."
On the other side of the parliament building, tens of thousands of demonstrators defied a ban and gathered to voice their displeasure with the German leader, whom many blame for forcing painful cuts on Greece in exchange for two EU-IMF bailout packages worth over €200 billion.
Greek riot police clashed with protestors who tried to break through a metal barrier to reach the cordoned-off area where Merkel and Samaras were meeting. Some demonstrators pelted police with rocks, bottles and sticks.
At least 30 people were hurt or suffered breathing problems from tear gas and about 300 were detained, police said.
Four people dressed in World War Two-era German military uniforms and riding on a small jeep, waved black-white-and-red swastika flags and raised their hands in the Hitler salute. In 1940 Greece opposed Nazi Germany and Fascist Italy, but was eventually invaded and conquered by Nazi Germany in April 1941 (see background).
Banners read "Merkel out, Greece is not your colony" and "This is not a European Union, it's slavery".
"We know that she is not here to offer favours but she must help us, this is our last chance," said 45-year-old Mari Hanioti, a saleswoman supporting her two children and her unemployed husband.
"She must be able to see what we are going through, how much we are suffering. She should see the poor neighbourhoods not just the expensive hotels."
Some 6,000 police officers were deployed for the six-hour visit, including anti-terrorist units and rooftop snipers. German sites in the Greek capital, including the embassy and Goethe Institute, were under special protection.
Before departing, Merkel met Greek business people to ask how reforms were progressing and hear how they were affected by an economy that has shrunk by a fifth in five years, leaving 25% of workers out of a job.
Merkel decided to come to show support for Samaras, a fellow conservative, as he struggles to convince reluctant, leftist coalition partners to impose more austerity on a society fraying at the edges after several rounds of cuts.
With a year to go until Germany holds a parliamentary election, Merkel also hoped to neutralise opposition criticism at home that she has neglected Greece and contributed to its woes by insisting on crushing budget cuts.