A tremendous Town performance made it four wins and a draw from their last five games as they came from behind to take all three points down in Dorset.
Dorchester took the lead just after the hour mark but Ben Stephens equalised immediately with his 13th goal of the season.
With only a few minutes left Dorchester had a great chance to regain the lead from the penalty spot but Louis Connor pulled off a brilliant save to keep Town in the game and two minutes into added time Loyiso Recci headed in the winner.