Back-to-back defeats - letting in seven goals in the process - had halted the National League North club just when they thought their promotion push was taking shape.
Defeats at Southport and Harrogate had left fans worried ahead of a visit from an in-form York.
But they need not have been concerned - a fine 2-0 victory for County pulled them back to within three points off the play off places. Watch Match Highlights Here.
Their manager knew his players could have felt sorry for themselves after their tricky run but against a club who had won five of their last six games they showed real character.
“I think we answered a few questions,” said the delighted Gannon after his team showed great togetherness in front of nearly 4,500 fans at Edgeley Park.
“We really needed a big performance and we got one - especially in the first half when we scored two good goals and gave ourselves a cushion.
“I’m really so pleased for the players, it’s been a difficult week for them. Results haven’t gone for us but they worked very hard.
“It was a big result and a big performance. We have suffered a little dip but this is the kind of day when you have to stand up and be counted and it could mean a lot.”
County’s next match is at Maidenhead United in the FA Trophy, before a home game with Nuneaton Town.