Former Maidstone winger Bobby-Joe Taylor scored twice in injury time to sink his old club. Maidstone, down to 10 men after Reiss Greenidge was sent off, looked set to win after coming from a goal down to lead.
But Dorking substitute Taylor scored a pair of headers in the 92nd and 96th minutes to turn the match on its head. It was desperately harsh on Maidstone, who had played superbly to get themselves in front with goals from Jack Barham and Roarie Deacon.
Goalkeeper Dan Barden went straight into the side after joining on loan from Championship club Norwich, with Yusuf Mersin back on the bench.
There were also starts for Kodi Lyons-Foster and Ryan Galvin as Hakan Hayrettin made three changes to the side he branded a disgrace after their 3-2 defeat by Altrincham on Saturday.