Paul Benson almost gave the Daggers an early lead but his header was well cleared off the line by Alex Whittle after nine minutes.
The hosts continued to press, with Corey Whitely shooting wide, while York's Vadaine Oliver headed over the bar on the half-hour mark.
Jon Parkin wasted a couple of chances for the Minstermen before Amari Morgan-Smith hit the crossbar with a header in first-half added time.
York came close again after 50 minutes in bizarre fashion when Dan Parslow's pass eluded everyone and hit the post.
Dagenham's Elliott Romain tested Scott Loach with a fine header later on in the second half before Raymond curled home the winner with eight minutes remaining.
Match report supplied by the Press Association.
Match ends, Dagenham and Redbridge 1, York City 0.
Second Half ends, Dagenham and Redbridge 1, York City 0.
Substitution, York City. Aidan Connolly replaces Asa Hall.
Substitution, York City. Scott Fenwick replaces Adriano Moke.
Jon Parkin (York City) is shown the yellow card.
Goal!  Dagenham and Redbridge 1, York City 0. Frankie Raymond (Dagenham and Redbridge).
Substitution, York City. Sam Muggleton replaces Amari Morgan-Smith.
Substitution, Dagenham and Redbridge. Frankie Raymond replaces Luke Guttridge.
Scott Doe (Dagenham and Redbridge) is shown the yellow card.
Amari Morgan-Smith (York City) is shown the yellow card.
Second Half begins Dagenham and Redbridge 0, York City 0.
First Half ends, Dagenham and Redbridge 0, York City 0.
First Half begins.
Lineups are announced and players are warming up.
Frankie Raymond scored a late winner as promotion-chasing Dagenham beat York in the National League at Victoria Road.