The Minstermen were then able to turn to their captain in the eighty-third minute, as Lennel John-Lewis netted to make it 2-1 to City and secure all three points would be taken.
The York City FC Men's side secured a vital win in the National League over the weekend against relegation rivals Yeovil Town.
An early strike from Olly Dyson was cancelled out by Yeovil's Joshua Staunton in the sixtieth minute.
The Minstermen were then able to turn to their captain in the eighty-third minute, as Lennel John-Lewis netted to make it 2-1 to City and secure all three points would be taken.
The victory puts Mikey Morton's men four points clear of the relegation zone ahead of their midweek match on Tuesday evening away at Eastleigh.