Russ Wilcox's Scunthorpe - who have not tasted defeat in the league since a 2-0 loss to Accrington Stanley in mid-November - appeared to be heading for a comfortable victory after establishing a 3-0 lead.
Sam Winnall opened the scoring in the 18th minute before two goals in five second-half minutes from Deon Burton and Paul Hayes.
But Dagenham responded in style, as Abu Ogogo netted in the 67th minute before Chris Dickson further reduced the deficit 10 minutes later.
It looked as though time would run out for the hosts, but substitute Luke Norris struck in the 89th minute to complete the turnaround.
Paul Cook's Chesterfield returned to the automatic promotion positions after coming from behind to beat Northampton Town 3-1 at Sixfields.
The league's bottom side went ahead after quarter of an hour through Darren Carter's penalty, but Danny Gardner levelled for Chesterfield on 25 minutes.
The visitors dominated the second half, and moved ahead eight minutes after the restart through Gary Roberts, before Armand Gnanduillet added a third in the closing stages.
Burton Albion were leapfrogged in the table by Fleetwood Town, as the hosts' 10-match unbeaten league run came to an abrupt end in a 4-2 defeat at the Pirelli Stadium.
Burton twice came from behind thanks to own goals from Mark Roberts and Alex Marrow but Jon Parkin's strike gave Fleetwood a 3-2 lead and then Junior Brown rounded off the scoring in the fourth minute of injury time.
Oxford United piled further misery on relegation-threatened Torquay United, with Deane Smalley scoring the only goal of the game in the sixth minute.
But there was worrying news for the home fans after the match with reports that manager Chris Wilder had resigned - seemingly to take over at Northampton.
Elsewhere, Newport County's winless streak was extended to four matches, as goals from Kaid Mohamed, Eliot Richards and John-Joe O'Toole earned Bristol Rovers a 3-1 triumph, while Morecambe twice clawed back a deficit to draw 2-2 with Portsmouth.
York City's recent resurgence came to a halt as they lost 2-0 at Hartlepool United, with Manchester United loanee Jack Barmby scoring on his debut, while Plymouth Argyle needed an 84th-minute leveller from Luke Young in a 1-1 draw with Cheltenham Town.
Mansfield Town fought back from 2-0 down to secure a 2-2 draw at home to Wycombe Wanderers, while Jack Midson struck in the 74th minute to help AFC Wimbledon come from behind to beat Exeter City 2-1.
The game between Accrington Stanley and Bury was postponed due to a waterlogged pitch.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1