The Estonian, a former quarter-finalist in SW19, was two points from defeat in the second set but hit back to post a 3-6 7-6 (8/6) 6-3 victory in the second round.
Kanepi had been pushed very hard by Britain's Tara Moore in round one but her hard and flat shots were initially too much for Kerber and she won the first three games.
But Kerber is a dogged defender and good mover, and she began to force errors from her opponent, who did not win another game in the first set.
The second was very tight, with Kanepi cutting out the errors and sending her opponent scrambling around the baseline.
There were a few spots of rain and Kanepi took a heavy fall behind the baseline in the 11th game.
Court Two was the venue for Caroline Wozniacki and Maria Sharapova's falls on Wednesday but the Estonian was unscathed.
She held to force a tie-break but looked on her way out at 5-1 down, only to win five points in a row and eventually take it on her second set point.
Kanepi continued that form at the start of the third, winning the first three games, and this time she kept her lead.
The Estonian has not always been the most mobile but she looked super fit, and Kerber imploded, handing Kanepi a second break.
Kanepi needed several chances to clinch it, twice serving double faults on match point, but she took her third opportunity with a backhand winner.
She will now face American Alison Riske, a 4-6 6-3 6-4 winner over Urszula Radwanska, in round three.