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.

David Jacques, from the University of Buckingham, made the discovery at Blick Mead in October, and said the carbon dating results had just been confirmed.
But he also raised concerns about possible damage to the site over plans to build a road tunnel past Stonehenge.
The Department of Transport said it would "consult before any building".
The Blick Mead site is about 1.5 miles (2.4km) from Stonehenge and archaeologists said "scientifically tested charcoal" dug up from the site had "revealed that it dated from around 4000 BC".
David Jacques said the dig had also found "evidence of feasting" including burnt flints, tools and remains of giant cattle, known as aurochs, which were eaten by early hunter gatherers.
Mr Jacques said: "British pre-history may have to be rewritten. This is the latest dated Mesolithic encampment ever found in the UK.
"Blick Mead site connects the early hunter gatherer groups returning to Britain after the Ice Age to the Stonehenge area, all the way through to the Neolithic in the late 5th Millennium BC.
"But our only chance to find out about the earliest chapter of Britain's history could be wrecked if the tunnel goes ahead."
Andy Rhind-Tutt, a former mayor and current chairman of Amesbury Museum, which part-funded the dig, said the discovery could "provide what archaeologists have been searching for centuries - the answer to the story of the pre-history of Stonehenge."
Earlier this month, the government announced funding for a 1.8-mile (2.9km) tunnel to remove congestion from the main road past Stonehenge.
A Department for Transport spokesman said: "As with any road scheme, we will consult with interested parties before any building begins on the A303.
"English Heritage and National Trust are supportive of our plans, and we will ensure sites of cultural or historical significance are safeguarded as we progress with the upgrade."
Frankie Raymond scored a late winner as promotion-chasing Dagenham beat York in the National League at Victoria Road.
[NEXT_CONCEPT]
Archaeologists working on a site near Stonehenge say they have found an untouched 6,000-year-old encampment which "could rewrite British history".