The Ifo institute's business climate index for July rose to 87.3 points, beating market expectations of 86.5 points and up from 85.9 points in June. It was the highest reading since November 2008.
"Firms are not so unhappy with the current business situation as they were the previous month. Those surveyed are, again, less sceptical about the coming six months. It looks as though the economy is gaining traction," it said.
The Ifo index measuring sentiment on current conditions among the 7,000 firms polled rose to 84.3 points from 82.4 points in June, while for business expectations the reading rose to 90.4 points from 89.5 points.
Chancellor Angela Merkel's government expects the export-oriented German economy - it even has a trade surplus - to contract by around six percent this year, second only to Japan among advanced economies.
Unicredit economist Andreas Rees said the message from the Ifo survey was "unambiguous."
"The worst recession ever in the last 60 years is now definitely behind us. We are raising the green flag for the second half of this year," Rees said in a research note.
The survey tallied with upbeat comments on Monday from the Bundesbank and the finance ministry, both predicting that Germany's worst slowdown since 1945 lost momentum in the second quarter.
The finance ministry cited as evidence the most recent hard data for the German economy - a rise in both industrial orders and production in May. In addition, German exports posted a slight rise of 0.3 percent in May from the previous month, leading some to predict that exports - on which the German economy is heavily reliant - have also turned the corner.
In the first quarter, gross domestic product (GDP) slumped 3.8 percent. Second quarter growth figures are set for release on August 13.
A threat to economic recovery is nonetheless posed by rising unemployment and deteriorating credit conditions and the government is trying to convince banks to lend more to businesses so the first signs of growth are not stamped out.