In a game in which both teams finished with ten-men, Wanderers took a 29th minute lead with a Phil Page penalty.
A Harry Shipton own goal pulled the Rebels back on level terms four minutes before the break but Matt Briggs restored Dorking`s lead three minutes after the restart.
Brannon O`Neill pulled the hosts back on level pegging after 65 minutes before substitute Shaun Findlay gave Dorking a 3-2 lead in the 81st minute. Fellow sub Tom Tolfrey made it 4-2 in stoppage time.
Ryman League
Molesey moved into second place after they beat travel sick Guernsey 4-0.
Stafford Palmer proved to be the home side`s hero with all four goals in the third, 29th, 49th and 73rd minutes.
Three Bridges could have moved into fourth spot with victory at Faversham Town but instead suffered a 3-1 defeat.
Stuart King gave the Kent side a 15th minute lead that Hakeem Adelakun cancelled out three minutes into the second half.
Faversham were back in front two minutes later though with King`s second of the game and then Liam King added a third with 16 minutes left on the clock.
Follow us: @rymanleaguenews on Twitter | Ryman League group on Facebook
Keep up-to-date with our exclusive email newsletters.
Subscribe