Five minutes into the second half, it looked like Saints had grabbed the bonus point, but the TMO overturned the referees' decision as Tom Wood lost the ball over the line.
Ruaridh McConnochie then returned after injury, and he ignited the Bath attack alongside Will Muir.
The England 7s duo continually caused Saints defence problems out wide, resulting in two more Priestland penalties.
In trademark fashion, Saints looked like they had scored when Taqele Naiyaravoro burst down the flank only to be stopped by an incredible last-ditch tackle from Ben Spencer.
Bath attacked again, and Zach Mercer went in for his second of the game after an intelligent kick over Saints blitz defence.
Priestland's added the extras to put Bath in front for the first time in the match with just over 10 minutes left.
The action kept on flowing; firstly Bath were denied a third try by the TMO following a knock-on, then another last-ditch tackle from Spencer held Saints up over the line.
Finally, Bath won a penalty at the resulting Saints scrum to earn the incredibly important win.
The 80 minutes saw a resolute display from the Blue, Black, and White with every single player putting their body on the line to secure their fifth Gallagher Premiership win of the season.