High-flying Exeter proved to have too much in the locker for Gary Mills’s mid-table Minstermen.
York fell behind after Alex Rodman scored in his own goal on 14 minutes.
But they were not behind for long as Michael Potts levelled for the Minstermen five minutes later.
Exeter, though, retook the lead eight minutes into the second half through Jimmy Keohane.
And the Grecians closed out the win to climb into the play-of places and leave York in lower mid-table.
Mills said: “I’m disappointed. I don’t think we deserved that, the players have worked so, so hard.
“I honestly think we’ve been excellent first half today and I was gutted to go in at 1-1 to be honest.
“It’s hard on us not to get anything out of this game today. I really feel that and I feel gutted for the players to be honest, because they’ve worked so hard.”