That marks the lowest level since November, when the indicator stood at 5.2 points, GfK said.
The institute had initially estimated the July level as 5.7 points, following 5.6 points in June, which means that consumer sentiment did not edge higher this month as initially predicted for Europe's biggest economy.
"The ongoing discussions about the best way to resolve Greece's debt crisis and the associated potential dangers for the single European currency are unsettling German consumers, and economic and income expectations have weakened accordingly," a GfK statement said.
GfK polled around 2,000 consumers, many of whom responded before eurozone leaders and private creditors agreed Thursday to a new rescue plan for Greece.
A breakdown of the survey showed that consumers' income expectations suffered the sharpest fall, wiping out a strong gain seen the previous month.
GfK underscored "the threat of a further increase in energy prices, which would also have a negative impact on the spending power of private households."
It added however that "Germans still expect that the economy will continue to record growth, even if this is not quite as strong as previously."
In its latest check of the German business climate, the Ifo economic research institute said Friday that sentiment had also dropped, owing in large part to cloudier outlooks in the manufacturing and retail sectors.
Turning back to consumers, Berenberg Bank senior economist Christian Schulz felt household confidence would return once the euro crisis had eased.
"Fundamentals remain favourable to a more positive outlook and improved consumer spending," Schulz said.
ING senior economist Carsten Brzeski focused on the effect of rising energy costs.
"The recent increase in fuel prices, coinciding with the start of the vacation period, seems to worry German consumers more than the eurozone debt crisis," Brzeski said.
"The softening of consumer confidence against the background of higher energy prices shows that commodity-driven inflation is probably the main threat for the German economy," he added.