Wrexham's promotion hopes were dealt a blow as Dartford won to end their 13-match unbeaten run in the league.
The visitors opened the scoring when Kevin Thornton's through ball allowed Danny Wright to score from 15 yards and claim his 16th goal of the season.
Dartford were much improved in the second half and substitute Jack Evans equalised with a low shot with 16 minutes left.
And Elliot Bradbrook's stoppage-time header from a corner secured victory.
The game had been hastily rearranged for Saturday after Friday night's postponement because of a waterlogged pitch.
Defeat at Princes Park was Wrexham's first league loss of 2013 but they remain top of the Blue Square Bet Premier on goal difference.
VIEWS FROM THE DRESSING ROOM
Dartford manager Tony Burman told BBC Radio Kent:
"It was a fantastic effort from anyone involved. We've beaten the majority of the top teams and it's been really good.
"Beating the league leaders today is a very proud moment, we should have scored before Wrexham scored, we've gone a goal down, it was important not to concede anymore, but I did fancy our chances.
"We've conceded a lot of goals in the last five or 10 minutes of late, it happens, it changed round today, we deserved the three points."
Wrexham player-manager Andy Morrell told BBC Radio Wales:
"I thought we were good first half and I thought we should probably have scored more but then in the second half we decided to play too much in our own half and caused ourselves a lot of problems.
"When you do that you get punished for it and Dartford did that. We just didn't play well enough in the second half to keep hold of our lead.
"It's a big set-back for us but we've got to look to go again and try and win on Tuesday."