Sam Simmonds' late try broke Bath's hearts as Exeter Chiefs inflicted an eighth-straight Premiership defeat on the league's bottom side.
Miles Reid's try helped Bath go 10-3 up midway through the first half as the hosts forced Exeter into mistakes.
Josh Iosefa-Scott went over soon after, but two Orlando Bailey penalties saw the hosts move three points clear.
Exeter increased the pressure late on and Simmonds went in from a close-range scrum with five minutes to go.
Joe Simmonds kicked a penalty in the final moment of the match to seal victory.
Bath remain rooted to the bottom of the table despite a spirited defensive performance, and Exeter are now fifth having played at least a game more than their closest rivals.
Bath's loss - their ninth in succession in all competitions since the start of the season - came in the wake of a review of the club's rugby operations and a decision to hire a dedicated defence coach.
That decision seemed to galvanise the hosts as time after time they stopped Exeter in their tracks - only succumbing in the final few moments of the game.
Bath made a great start as Will Muir almost went over inside the first 15 seconds after a good kick-off before his side won a scrum penalty that allowed Bailey to split the posts after three minutes.
Henry Slade's penalty brought Exeter level, but the Chiefs' line-out failed to fire while Bath had the better of the scrum - their try came after a scrum penalty set up field position in the corner and Reid was mauled over from a line-out.
Slade kicked a second penalty 12 minutes before the break as Exeter lost confidence in their line-out, and they were lucky not to have Stuart Hogg sent to the sin-bin when it looked as though he nudged Tom de Glanville over as he chased a kick towards goal.
Bath gave away a penalty from the second-half kick-off and this time Exeter did kick for their line-out. A few phases later Iosefa-Scott went over for his first Exeter try before Bailey levelled the scores with his second penalty.
Five minutes later came a game-changing moment - Bath centre Max Ojomoh decided to pass rather than go for the line when Jonathan Joseph's chip over seemed to put him clear and Exeter held Bath out until Bailey kicked a third penalty a few minutes later.
Bath's defence was again superb as they held up Simmonds over their line with eight minutes to go after a powerful Exeter maul.
But the visitors had the bit between their teeth - Sam Underhill stopped Simmonds with a high tackle as he tried to go over and Exeter opted for the scrum from the resulting penalty which the England forward scored from to seal the four points.
Bath head coach Neal Hatley told BBC Radio Bristol:
"A lot of the Premiership games are pretty nip and tuck. There's been one or two blowouts, but this is a tight league and when we look back, potentially at how we exited and one or two things like that, there's some areas we could do better.
"But first and foremost I'm unbelievably proud of the effort that the players have put in. We asked them to work hard tonight - they've done that.
"I'm always nervous about turning corners and false dawns, but what we'll do is we'll have a look at that. I thought the first half our set-piece was very good, we scrummaged exceptionally well and we put a lot of pressure on them aerially.
"We've got to look at how we can recreate more and more of those moments."
Exeter director of rugby Rob Baxter told BBC Radio Devon:
"Every win is a good win for us at the moment and I actually think we do need to stop and enjoy it.
"I think if there's one thing that we probably need to address more than anything else as a team it's getting it back to those core basics of what being a rugby player's about.
"I think we've probably become a little bit miserable if I'm honest with you. We've probably had those few years where winning against bottom-of-the-league teams becomes relatively regulation and that's probably part of that issue where we probably lack a little bit of vibrancy.
"Some of that is that vibrancy of playing rugby, but I do feel it's there in us and it's going to come. I genuinely think that, but it's not going to come overnight. We're going to have to work at it and get there over a period of a few weeks, maybe even a couple of months."
Bath: De Glanville; Rokoduguni, Joseph, Ojomoh, Muir; Bailey, B Spencer; Boyce, Dunn, Stuart, McNally, Ewels (capt), Reid, Underhill, Bayliss
Replacements: du Toit, Vaughan, Rae, W Spencer, Ellis, Simpson, Cipriani, McConnochie
Exeter: Hogg; Nowell, Slade, Whitten, O'Flaherty; H Skinner, J Maunder; Hepburn, Yeandle (capt), Iosefa-Scott, S Skinner, Armand, Ewers, Kirsten, S Simmonds
Replacements: Innard, Moon, Williams, Tuima, Capstick, S Maunder, J Simmonds Hendrickson
Referee: Matthew Carley (RFU).