Teenager Ryan Mills was the hero as his penalty gave Gloucester a 14-11 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.