It was the Warriors who raced into an early lead, with Andy Goode scoring four penalties in the first 15 minutes of the game.
Olly Barkley replied with two penalties of his own on 22 and 29 minutes, before Goode was on target again just after the half-hour mark.
Barkley found time for one more before the sides went in at half time.
Another penalty from Barkley was registered two minutes after the restart, before he added another two on 50 and 66 minutes.
With 69 minutes gone, James Percival scored a try for Worcester to give them the advantage, though Barkley was back again to hit another penalty on 74 minutes.
Goode replied with his first penalty of the second half on 78 minutes to seemingly secure the win for Worcester.
However, Barkley got the decisive penalty - his eighth of the game - right on 80 minutes to become the hero for Bath and secure the win.