Teenager Ryan Mills was the hero as his penalty gave Gloucester victory at The Rec to complete the double over local rivals Bath.
The 19-year-old England Under-20 cap, on as a replacement, calmly slotted the crucial three-pointer with 10 minutes to play of a fiercely-contested West Country derby after Matt Banahan had been guilty of not rolling away.
Gloucester had led 11-5 at the break thanks to a try from prop Nick Wood and two Freddie Burns penalties.
Bath had opened the scoring after wing Tom Biggs showed good footballing skills to touch down and a penalty apiece from centre Olly Barkley and fly-half Tom Heathcote levelled matters entering the final quarter, only for Mills to strike the clinching kick.
The win dents Bath's hopes of Heineken Cup qualification but Gloucester's win leaves them well-placed to launch a late surge for a place in the Aviva Premiership semi-finals.
Clashes between the two rivals have always been feisty affairs and this meeting proved no different as both sides lost a man to the sin bin after just two minutes.
A clash between second rows Jim Hamilton and Ryan Caldwell escalated into a confrontation involving all 30 players. The two locks were handed yellow cards by referee Wayne Barnes and continued to exchange words as they headed to the touchline.
Bath had the better of the territory in the early going and they made the most of it as Biggs claimed the opening try after 10 minutes.
Gloucester were penalised for an early lift at a line-out on their 10-yard line, Bath took the free-kick quickly and it was the unlikely figure of hooker Lee Mears who put a cute grubber in behind Charlie Sharples for Biggs to kick ahead and dot down.
But Gloucester hit back with a well-crafted try eight minutes later.
Burns made a half-break through three Bath forwards defending against him and fed centre Eliota Fuimaomo-Sapolu. The Samoan put Mike Tindall clear, the England centre did not have the pace to make it the ball was worked back left where a depleted home defence was punished as James Simpson-Daniel's long pass put prop Wood in at the corner despite Olly Woodburn's desperate covering tackle.
Fresh from his try Wood then used his more renowned scrummaging abilities to force a penalty out of Anthony Perenise, but Burns somehow contrived to miss from in front of the posts.
But the fly-half did give Gloucester a deserved lead with his second penalty attempt, although it came after flanker Akapusi Qera blew a certain try by ignoring a two-man overlap and then dropping the ball as he reached for the line having been hauled down by Banahan.
Barkley then missed a penalty sitter of his own and while Burns was himself off target moments later he did reward another concerted period of Gloucester pressure by closing the half with a long-range three-pointer after Biggs had felled flanker Tom Savage with a high shot.
Gloucester started the second half with an impressive scrum and driving maul, while the combination of full-back Jonny May and wing Simpson-Daniel looked dangerous on the counter.
Bath hit back as a lovely rehearsed move sent Woodburn scything through the Cherry and Whites' defence. The hosts battered away at the line and were repelled by illegal means, allowing Barkley to trim the gap with his first successful penalty before Heathcote tied the scores with a three-pointer of his own moments later.
But that good work was undone when Banahan was penalised for not rolling away in the tackle and Mills punished the indiscretion.
Bath had one last chance to snatch victory but a knock-on at the crucial line-out gave Gloucester the win.