York had gone into the match on the back of 12 clean sheets from 14 games, but they almost conceded early on with Lee Minshull heading Ryan Jackson’s throw against the post.
The Minstermen had struggled in the opening 25 minutes but they were lucky to keep 11 men on the pitch but Lewis Montrose only received a yellow card for a lunge on Minshull.
Five minutes before the break Newport needed goalkeeper Ian McLoughlin to be alert as he blocked two efforts from Adam Reed either side of Michael Coulson striking the crossbar.
Both sides went close to opening the scoring after the restart with Reed threatening before Newport’s Robbie Willmott saw his 25-yard free kick tipped over by Nick Pope.
York pushed on for the crucial goal and they finally got it in the 77th minute with Coulson converting a 25-yard free kick beyond McLoughlin to seal a play-off place.