The Spaniard triumphed 7-5, 7-6 (7/4) to make the last 16 for a second successive year at the All England Club.
Badosa recovered from a 4-2 deficit in the opening set to get the better of Kvitova, who double-faulted when she was facing set point.
In a tighter second set, Kvitova was eventually undone by her all-or-nothing approach.
By the end of the match she had hit 34 winners and 31 unforced errors.
"For me it's one of the biggest challenges to play Petra on grass," said 24-year-old Badosa.
"But it's a pleasure to face her. For me she's a legend and an inspiration."