Mildenhall dived to his left to keep out a close-range shot from Chris Smith after 70 minutes, and five minutes from time the tall keeper arched his back to palm away a 25-yard drive from substitute Michael Coulson that looked destined for the top corner.
It meant the man-of-the-match award for Mildenhall, who had begun the game with an awful mistake that saw Josh Carson shoot wide with the Rovers keeper stranded after failing to collect a free-kick into the box.
Pirates boss John Ward said: "It showed the mental strength of Steve that he didn't let that affect him. He also made a hash of a couple of clearances in the first half, but didn't let that worry him either.
"The two saves in the second half were outstanding. He hasn't often had to come to our rescue because we have been playing well, but he responded when we needed him.
"I'm not going to beat myself up over the performance, although of course we wanted to reward a big holiday crowd with a decisive win. York proved very resolute and, while there was no problem with our attitude or effort, we lacked that bit of ability to make a breakthrough."
York are now without a win in 16 matches but manager Nigel Worthington was pleased with his side's display.
He said: "Now we have to maintain that for our last five games and if we do we will give ourselves the chance to get the results we need. Their goalkeeper has denied us. The save from Coulson was absolutely fantastic because it was a great strike and the ball was arrowing towards the top corner.
"Richard Cresswell did a really good job for us up front, showing all his experience, and there were other excellent individual efforts.
"We defended solidly and restricted Rovers to very few chances, which pleases me. I just think we could be more clinical in making our chances count."