Worcester took the lead on 43 minutes through striker Mike Symons, who scored his fifth goal in six games.
The hosts looked beaten as the game entered injury time but Jason St Juste’s cross from the left was nodded back across goal and substitute Cameron Darkwah fired home the equaliser.
And then, in the third minute of added time, Danny Lowe’s free kick was not cleared and Lee Gregory pounced to net the winner.
After the game, Worcester boss Carl Heeley told BBC Hereford & Worcester: "They mugged us and they know that. Sometimes in football, the result doesn't befit what it should've been."