Tries from Darren Dawidiuk and Charlie Sharples helped Gloucester come from behind to win a bruising local derby battle with Bath at Kingsholm.
Bath were 6-0 up and in control midway through the first half after two Sam Vesty penalties inside five minutes.
But Tim Taylor's penalty was followed two minutes before the break by hooker Dawidiuk's try, converted by Taylor.
Taylor added two second-half penalties before winger Sharples' late victory-sealing try, improved by Freddie Burns.
Sharples' dramatic late, length-of-the-field score came after the Cherry and Whites had been reduced to 14 men following the sin-binning of home centre Lesley Vainikolo.
Gloucester cashed in on their threat from driving line-outs when Dawidiuk emerged at the bottom of a pile of bodies for the game's opening try.
The Cherry and Whites maintained their momentum when Taylor landed his second penalty within two minutes of the restart, although he was off target with his next attempt from inside his own half.
They came back at us and unfortunately we couldn't handle it
Bath coach Martin Haag
Bath were rattled and it was now the visitors who were having to soak up wave after wave of attacks, with another infringement allowing Taylor to move the Cherry and Whites more than a score clear as the contest entered the final quarter.
Vesty had a chance to narrow the gap after an increasingly rare foray into Gloucester territory, but made a hash of his penalty attempt, which he spooned to the right of the uprights, while replacement Tom Heathcote repeated the feat as Bath hopes faded.
Vainikolo was sin-binned in the dying moments for a high shot on Heathcote, who was again wide of the mark with the resulting penalty. And the youngster's difficult day ended with another error, which triggered Gloucester's second try.
His knock-on saw Sharples attack from his own line, the wing kicking ahead and beating the idling Mark McMillan to the ball to gather and touch down.
Burns's simple conversion rounded off victory - a big improvement after last weekend's 42-6 drubbing at Harlequins - to leave Bath now winless at Kingsholm since 2006.
Gloucester coach Bryan Redpath:
"I thought our pack were outstanding. There were some great performances across the board and that set a platform.
"Today we played as a team, defended as a team and got our rewards as a team.
"We grew in confidence after defending for long periods. Ideally you don't want to get into a situation like that, but after last week's performance it was really important that we dig in today and showed lots of character and passion."
Bath coach Martin Haag:
"They upped the pace and we went to sleep and allowed them to score a try that put us on the back foot.
"But up to that point we played some great stuff and should have scored a couple of tries. They came back at us and unfortunately we couldn't handle it."
Bath director of rugby Sir Ian McGeechan:
"For 32 minutes we were pretty good. We kept Gloucester in their own half with no rugby to play and controlled it. With a little bit more execution we probably could have been a couple more scores up.
"They defended well so you have to give them credit, but a couple of poor executions and we gave them a lifeline."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.