Bath (5) 11
Gloucester (11) 14
Burns 2, Mills
Replacement fly-half Ryan Mills kicked Gloucester to victory in a scrappy Premiership West country derby to continue their dominance over Bath.
A Tom Biggs try put the hosts ahead but Gloucester dominated the first half and two Freddie Burns penalties gave them the lead after Nick Wood's score.
Bath drew level after the break through the boots of Olly Barkley and then Tom Heathcote on the hour.
But with 15 minutes left teenager Mills landed the telling kick.
The opening, amid poor conditions, was an unremarkable exchange of kicking, save for a second-minute brawl that saw instigators Jim Hamilton and Ryan Caldwell sin-binned.
With nine minutes gone Biggs beat Charlie Sharples and Jonny May to Lee Mears's deft grubber to touch down in the left corner but Barkley's conversion was wayward.
The first expansive play ended in Wood's try after Burns and Eliota Fuimaono-Sapolu combined to cut open Bath and then James Simpson-Daniel's glorious miss pass found his prop out wide.
Burns's kick came off the post and, just as Gloucester started to dominate, the stand-off missed an easy penalty in front of the posts.
He added two more penalties, and missed one - along with Barkley - before the break but the visitors should have been further ahead after Akapusi Qera butchered a gilt-edged chance.
The gloom gave way to bright sunshine for the second half but 15 minutes passed before Olly Woodburn's break resulted in an easy penalty under the posts for the hosts.
Heathcote stepped up to land a 40-metre penalty on the hour and square the score.
But as both sides pushed for the win continuity broke down on both sides.
Mills, on for the injured Burns, held his nerve to land a 28-metre penalty and make it six wins for Gloucester out of the last eight games between the old rivals.
Bath director of rugby Sir Ian McGeechan:
"I think at 11-all we had the momentum but unfortunately we made a couple of poor decisions kicking the ball out.
"What we needed was a good clearance from the kick off but we didn't get it, they ran it back at us and we never really got back out of our half from there.
"Their kicking game was more astute than ours today."
Gloucester head coach Bryan Redpath told BBC Radio Gloucestershire:
"We knew this game was going to be huge obviously away from home, for the table we needed four points today and the boys dug in well.
"I thought we were great in the first half, we created two easy opportunities which we didn't take.
"We had two little errors that cost us dearly at certain times in the second half time but we stuck at it.
"We've performed well against Harlequins but we haven't taken the points in the last three games. Now this is a real opportunity for us to have a go at them next week."
Vesty; Woodburn, Banahan, Barkley, Biggs; Heathcote, Claassens; Catt, Mears, Perenise; Hooper, Caldwell; Skirving, Louw, Taylor.
Carraro for Barkley (69), Beech for Catt (69), Batty for Mears (76), Mercer for Taylor (71).
May; Sharples, Tindall, Fuimaono-Sapolu, Simpson-Daniel; Burns, R Lawson; Wood, S Lawson, Harden; Hamilton, Brown; Savage, Qera, Cox.
Mills for Burns (56), D. Dawidiuk for S. Lawson (71), Knight for Harden (70).
Wayne Barnes (RFU).