Davydenko led 4-1 in the second-set tiebreaker but unforced errors allowed Nadal to twice serve for the match. However, the Spaniard sprayed his returns wide, and Davydenko broke two times to Nadal's one in the third set to close it out.
The sixth-ranked Russian's third straight victory over Nadal improved his overall record to 5-4.
"I did not come here expecting to win. I am surprised that I have won," Davydenko said. "It is an amazing feeling to have won here. I have played semifinals and finals here but never won."
It was a second consecutive title for Davydenko after winning the London World Tour Finals on Nov. 29. He also beat Nadal and Roger Federer in that event.
David Nalbandian of Argentina is the only other player to beat Federer and Nadal in the same tournament on two occasions -- at the Madrid Masters and Paris Masters in 2007.
"Congratulations to Nikolay, he played unbelievable tennis," Nadal said. "He played better than I did."
Nadal broke Davydenko three times in the opening with help from his powerful serve.
The players then traded breaks in the second set, which Davydenko won with a two-handed backhand winner followed by a forehand down the line after they were locked at 8-8 in the tiebreaker.
Davydenko also became the 38th male player since the Open Era began in 1968 to win 20 or more titles.