Mears, here tackling Mark Hopley, scored the first try for Bath
Bath denied Northampton top spot after a late Olly Barkley penalty handed the hosts a crucial victory that boosts their Premiership play-off hopes.
The Saints, who rested 12 players after their win on Saturday, took the lead through Paul Diggin's try.
Lee Mears' try put Bath ahead but Shane Geraghty's penalty levelled matters.
Matt Banahan's powerful finish put Bath back in front and although three Geraghty penalties gave Northampton the lead, Barkley's penalty saw Bath home.
The win means Bath stay in sixth with two games to play but lifts them to 51 points, one point behind fifth-placed London Irish and two behind fourth-placed Wasps.
Bath face Wasps at Twickenham on Saturday before a final-day game at home to Leeds.
The West country side, relegation candidates before Christmas, have now lost just one of their last 10 league games.
It was a close call, though, with Barkley's winning kick arriving six minutes from time after Northampton flanker Neil Best was sin-binned.
The only consolation for Saints was a losing bonus point that leaves them just behind Premiership leaders Leicester. A victory over Saracens on Saturday will guarantee a home semi-final.
Bath coach Steve Meehan:
"It was tighter than we wanted it to be, but it was a win, and it could be a very valuable one. It was done in a courageous manner, and given that it was just 72 hours after our last game, we are pretty happy with that.
"In terms of the play-offs nothing has changed. We have got to win our two remaining games and Wasps and London Irish have to drop one.
"There is still an opportunity for us, and I am sure the guys will front-up on Saturday. You won't find anyone in our dressing room who doesn't want to play in that game."
Northampton rugby director Jim Mallinder:
"We knew it would be tough. Bath are on a bit of a high, but I thought we played well and with a little bit of luck we would have won.
"I was delighted with the players who came into the team, and hopefully it hasn't taken too much out of them.
"I was delighted with Shane Geraghty - he took his chances with the penalties while I thought our front row did really well. Come Saturday, we will be well rested and looking forward to the challenge against Saracens."
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.