Shots were fired at the German ambassador's residence in Athens early on Monday, without causing injury.
Bullets were found embedded in the steel gate, Greece's Kathimerini news website reports.
Ambassador Wolfgang Dold's residence is in the Greek capital's Halandri district. The raid took place at around 03:30 local time (01:30 GMT).
It is not clear who the attackers were. Germany's insistence on budget cuts has caused much resentment in Greece.
At least 60 spent bullet casings were found at the scene of the attack. Police say the bullets came from two Kalashnikov assault rifles.
So far no-one has admitted carrying out the attack.
In a message to the unidentified perpetrators, Mr Dold said "whoever is responsible for this act: you will not succeed in disrupting the close and friendly relations of our two countries".
He was in the residence when the shots were fired.
German Foreign Minister Frank-Walter Steinmeier said Berlin took the attack "very seriously" and "nothing, absolutely nothing, can justify such an attack".
The Greek government called it a "cowardly terrorist action" aimed at undermining Greece's six-month presidency of the EU, which begins on 1 January.
Germany is the biggest lender involved in the Greek bailout - a 240bn-euro (£200bn; $331bn) rescue for the debt-laden country that started in 2010.
The bailout conditions require Greece to rein in public spending, and that has meant hardship for Greeks who have lost their jobs or who now pay more for essential services.
In 1999 the ambassador's residence was hit by a rocket-propelled grenade, in an attack claimed by the now defunct radical left-wing group November 17.