The German started the match at a canter, holding easily before breaking thanks to a pair of wayward forehands from the Australian after pushing her to deuce.
However, Kerber's set collapsed from there, losing five games, and surrendering her lead thanks to a forehand into the tramline. Kerber squandered four break points in Gavrilova's next game before the 21-year-old moved ahead.
A second break, confirmed with an emphatic volley, put Gavrilova firmly in the ascendancy and though Kerber halved her deficit, the eighth seed took the set by breaking once more.
The first three games of the second set went with serve before Kerber sent down a double fault to give Gavrilova a break. There was little sign of a comeback from there. Though the US Open champion squandered two break points in the next game, she was broken to love thanks to a series of unforced errors to give the underdog a 5-1 lead.
The youngster made no mistake from there, wrapping up a big-name scalp, with Kerber sending yet another shot into the net.
"[I was not surprised by Gavrilova] because I know how she is playing but I was not playing my best tennis and my serve wasn't working well and I can just say that I was not at my best, that's for sure," Kerber said after the match.
"It's a long season and we've been playing for 10 months. I've been playing a lot of matches this year, and I think I need a few days off to get ready for Singapore because I am tired and I need a lot of treatment to get ready for the next one. I was not serving at my best, I made a lot of double faults which is not normal for my game."
Gavrilova, meanwhile, was delighted after recording her first career win over Kerber.
"I guess I'm really excited, I've played Angie six times and now I've finally won, it's really exciting," she said.
"I was prepared for a battle. I think Angie has had a long season. I didn't expect to win that easily but I was ready to turn it around and get a win against her."