More on KentOnline
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.
Maidstone may have trailed to a sixth-minute goal - James McShane finishing the rebound after Barden parried from Sami El-Abd - but Hayrettin’s home truths clearly had the desired effect.
There could be no doubt about that for, despite the setback, Maidstone were at it all over the park.
They were by far the better side in the first half, controlling the game in midfield and Barham looking a constant threat as the lone frontman.
Barham flicked wide after Galvin took play from one end to the other and also tested Joe Walsh after cutting inside, before Sam Corne went close on the half-volley.
A Maidstone goal looked on the cards and it arrived in the 22nd minute.
It was one of the Stones’ best this season, too, with Deacon turning brilliantly on Corne’s pass to play in Barham, who finished in the far corner.
A Regan Booty shot was diverted inches wide by Corne and Walsh made a good save from Galvin’s header before Maidstone went 2-1 up on 41 minutes.
Booty’s in-swinging free-kick wasn’t dealt with and the ball dropped to Deacon, who made no mistake.
Dorking went close to an equaliser in added time, former Tonbridge midfielder Nicky Wheeler hitting the bar with a cracking 20-yard strike.
Maidstone started the second half well, Barham bending a shot narrowly past the far post after Galvin picked up a loose ball in midfield, and Sha’mar Lawson firing over from Deacon’s lay-off.
They went close again before the hour mark through Corne’s first-time strike after sharp passing around the edge of the area.
Barden endeared himself to Stones fans by racing off his line to deny Ryan Seager when the Dorking striker went through one-on-one - a class save.
Maidstone were defending well, Jerome Binnom-Williams and Lyons-Foster with important interventions.
But they had a problem in the 68th minute when Greenidge picked up a second yellow card following a challenge out wide on Jimmy Muitt.
Maidstone got Joe Ellul on for the last 20 minutes, and the 10 men worked hard to keep Dorking at bay, while taking the chance to get forward when they could.
Barden made a superb late save from Niall McManus but was beaten when Taylor met a cross two minutes into added time, while Corne was down injured.
Dorking tails were up and another Taylor header, with seconds to go, saw Marc White's side take the points.
Dorking: Walsh, Philpott, El-Abd (Taylor 49mins), McManus, Muitt, Seager, McShane (Egan 37mins), Wheeler (Kennedy 79mins), Gallagher, Ottaway, Procter. Subs not used: Harris, Mekki.
Maidstone: Barden, Fowler, Lyons-Foster, Greenidge, Binnom-Williams, Lawson, Booty (Ellul 71mins), Deacon, Corne, Galvin (Fawole 80mins), Barham (Ghandour 89mins). Subs not used: Mersin, Odusanya.
Referee: Gary Parsons.
Attendance: