The visitors took the lead midway through the opening half when the latest in a series of long throws from Exodus Geohaghan was backheaded into the far corner of the net by Ross Dyer.
But their opponents were back level shortly before half-time after Geohaghan instead turned villain by diverting Jon Challinor's cross into his own net.
Mansfield later had to play the final sixteen minutes with only ten-men following the sending-off of leading scorer Matt Green for two bookable offences - meaning the 29-goal striker is automatically ruled out of the return game.
The Minstermen typically played most of the football with defender Chris Doig hooking over a first-minute corner from Patrick McLaughlin while Matty Blair also had a goal disallowed for offside when skipper Chris Smith challenged McLaughlin's free-kick.
But after the visitors had already threatened through Anthony Howell they surged ahead courtesy of Dyer's 26th minute near post header.
Ashley Chambers saw a fifteen-yard drive parried by Alan Marriott as the hosts tried a response before the experienced keeper was left helpless after Geohaghan turned Challinor's cross into his own net.
York's leading scorer Jason Walker soon tried his luck from 35-yards and also missed an excellent chance after swapping passes with Chambers and dragging wide of the post.
Blair called Marriott into routine action following the restart and Howell drilled straight at Michael Ingham in reply before the already cautioned Jamal Fyfield escaped further punishment when tripping Gary Roberts.
However, Green was not quite so fortunate as he challenged Ingham on 74 minutes and was promptly dismissed.
The Minstermen were now intent on winning it and Smith and Challinor each went close before substitute Adriano Moké headed a late chance over following Challinor's forward delivery.