Anthony Watson and Matt Banahan scored second-half tries as Bath Rugby battled to a fourth win of the season away at Gloucester Rugby in the West Country derby.
Both sides struggled in the first half and it remained scoreless until James Hook's penalty just after the half-hour mark gave Gloucester the lead as defences dominated.
Greig Laidlaw struggled off the tee as he missed three of four penalties, which allowed Bath to stay close to the hosts and make them pay.
Watson's neat finish gave them the lead for the first time, while Banahan's effort less than ten minutes from time confirmed victory.
The game started at a frantic pace with Gloucester moving the ball through the hands quickly, making Bath's defence scramble in both directions.
But reliable kicker Laidlaw missed a simple chance to put the hosts ahead as he pulled a penalty wide from in front of the posts.
Both sides started to struggle in attack as they failed to move the ball quickly enough and it became a kicking contest as both searched for territory.
Bath struggled to get into Gloucester's 22 and so fly-half George Ford was forced to try a drop goal attempt which rattled the posts.
Gloucester finally broke the deadlock just after the half-hour mark as Hook, starting his first game of the season, successfully landed a penalty from half way.
The former Wales international had another chance from even longer a few minutes later but could not quite make the distance, leaving his penalty as the only score of the half.
The sloppy play on show did not ease up after the break as Semesa Rokoduguni spilled a mandatory high ball a couple of minutes in.
But Bath got their first points minutes later as Ford found his range with a drop goal, landing his fourth of the season, although Rokoduguni was in space on the far side.
Laidlaw also found his kicking boots as he gave Gloucester the lead again with a penalty from a difficult angle on the right, before Ford narrowly missed from long range.
The visitors continued to pile on the pressure as they hammered away at Gloucester's defence ten metres out as Rokoduguni charged down the right, but the home side remained strong, forced a Bath error and cleared their lines.
But Gloucester could not hold out much longer as Watson powered over on the left wing after Bath finally moved the ball quickly enough to move Gloucester's defence out of position.
Ford missed the conversion from wide on the left, leaving the away side with just a two-point lead going into the final quarter.
Laidlaw missed two great chances to give Gloucester the lead with two separate penalties from over 40 metres with both falling short, before some great Bath defending saw them turn the ball over with Gloucester just ten metres out.
And they took their momentum up the other end, as a move down the blindside following a scrum saw an unmarked Banahan slip in to kill the game.