The seventh-seeded Russian also won the Munich tournament in 2004.
Davydenko broke serve for a decisive 2-0 lead in the final set and cruised to his 21st title.
"I haven't played that well for a long time," Davydenko said. "I think I will have to come back."
The fifth-seeded Mayer was looking for his first title. He also lost to Davydenko in the 2006 final in Sopot, Poland. Davydenko, a former third-ranked player, leads the head-to-head series against Mayer 3-2.
Mayer, the highest-ranked German, is expected to move to No. 30.
Davydenko had to save a pair of break points to serve out the first set. Mayer won the middle set thanks to an early break, but could not come back after falling behind in the third, allowing Davydenko to capture his first title of the year.
"Nikolay deserved to win," said Mayer, who had never won a match in three previous events on Munich's red clay.