Kaymer shot 3-over-par 75 in Sunday's closing 18 regulation holes.
His disastrous round featured a triple-bogey eight at the 11th, when he twice hit his ball into the water, and two bogeys.
Both players finished 72 holes at 15-under 273, with Hansen shooting 5-under 67, including a birdie at the 18th and final hole.
"I struggled a little bit and made a big mistake on the 11th," Kaymer said after becoming the first native son to win the BMW International Open in its 20-year history. "I didn't keep my patience, but I will know for next time and I kept fighting."
Kaymer won the event by making birdie on the first playoff hole, while Hansen missed a putt for par.
Kaymer claimed his second European Tour tournament victory, both coming this season.
2014: The Year in Music [PHOTOS]