The Quakers took the lead in the 19th minute when goalkeeper Tony Roberts could only push Ricky Ravenhill’s header from Tommy Wright’s cross on to the post and it rolled over the line.
The visitors should have equalised seconds before the interval when Sam Saunders put a Glen Southam cross over the crossbar from close range – and they were made to pay seven minutes into the second half when substitute Shaun Reay’s shot was put through his own net by Mark Arber.
Dagenham substitute Sam Sloma pulled one back with a close-range effort in the 63rd minute and then two minutes later Dagenham were level when Ben Strevens was brought down in the area.
Darlington defender Ben Parker was shown a straight red card and 10-man Darlington found themselves pegged back when Dave Rainford fired in the spot kick.
The game was won in the 73rd minute when Paul Benson’s shot from a narrow angle was deflected in by Clark Keltie to complete a remarkable comeback – and Mansfield’s defeat to Rotherham means the Daggers are safe from the threat of relegation.