In a quiet first half Wimbledon threatened through Jack Midson and Byron Harrison with York's only chance coming from a long-range effort from Jason Walker.
Ten minutes after the restart Wimbledon finally broke the deadlock through top scorer Harrison. The forward raced onto a huge header from Will Antwi before prodding the ball beyond Michael Ingham who had come racing out of his goal.
With York pushing for an equaliser the visitors almost doubled their lead but Ingham produced a fine reflex save from Yado Mambo before Charlie Strutton somehow headed over George Francomb's cross.
The pressure finally told on the York defence ten minutes from time with Stacy Long finding the bottom corner after some neat work from Strutton.
Four minutes later Neal Ardley's team put the result beyond any doubt as Midson converted from the penalty sport after Chris Smith had upended Strutton in the box.