The Dockers moved up to 10th spot and are just four points off the play-offs after this hard-earned win.
The visiting Motormen took the lead from their first attack when Charlie Jeorgiou found Andy Edmunds on the edge of the area and the latter smashed home past keeper Andy Hall.
But it was the hosts who were in top gear from that point.
Joel Barnett spurned an equalising chance when his effort was blocked on the line by George Alder.
But he made amends on 54 minutes when he provided an excellent cross for Jamie Wallace to grab the equaliser after the best move of the match.
The winning goal came 15 minutes from time when substitute Chris Taylor headed home past ex-Tilbury keeper James Marrable.
The only downside for the Dockers came late on when Paul Shave was sent off on his debut.