The draw had looked the most likely result in a scrappy contest played on an uneven surface at Victoria Road, with chances at a premium for both sides.
However with 75 minutes gone, Scott Doe was hesitant in defence when O'Grady ran at him and the former Oldham striker duly slotted it through his legs and into the net from 12 yards.
Rochdale went into the game on the back of two straight victories and looked the more dangerous side early on, with Nicky Adams a constant threat on the right wing.
O'Grady and Jean -Louis Akpa Akpro both had chances for Keith Hill's side, but the Daggers ended the half strongly with Bas Savage poking wide from close range.
Dagenham boss John Still threw on new loan signing Marvin Morgan but their best effort came from goalkeeper Tony Roberts who came up for a corner late on and headed wide.