The business climate index calculated each month by the Munich-based economic research institute Ifo, rose to 103.5 points.
Economists polled by Thomson Financial News had forecast the index would fall to 101.9 after dropping to 102.4 in April, the biggest monthly loss since September 2001.
An Ifo statement quoted president Hans-Werner Sinn as noting however that "the business climate index only partially recovered its losses from April."
In March the index had stood at 104.8 points.
Surveyed companies nonetheless "now assess their current situation more positively," Sinn added in another sign that Germany was resisting the effects of a US economic slump, high energy prices and the euro's rise against other major currencies.
For its monthly survey, Ifo polls 7,000 companies about their assessment of current business and their expectations for the next six months. It is considered the most reliable barometer of the current state of the German economy and its outlook.
A breakdown of the results showed that the current situation index also rose to 110.1 points from 108.4 in April, while the expectations indicator edged up to 97.3 points from 96.7 points.
"On the whole, the dampening of economic activity in Germany in the months following the very good first quarter should be moderate," Sinn said.
German gross domestic product (GDP) grew by 1.5 percent in the first quarter of 2008, official data showed last week, the fastest quarterly rate since early 1996.
"May's rise in the German Ifo index provides some encouragement that German businesses are seeing economic activity hold up pretty well," said Jennifer McKeown at Capital Economics.
"It leaves the index far above its long-run average and at similar levels to those reached in the second half of last year."