Wes Fletcher's late winner ended Fleetwood's five-game unbeaten run and earned York a shock three points.
Conor McLaughlin flicked Will Hayhurst's corner past his own goalkeeper to gift York the lead just before half-time.
Fleetwood equalised when a free-kick fell to on-loan forward Mikael Mandron who thumped in at the back post.
David Ball rattled the crossbar for the hosts before Fletcher flicked in the winner from Michael Coulson's cross.
VIEWS FROM THE DRESSING ROOM
Fleetwood manager Graham Alexander told BBC Radio Lancashire:
"The wind played a part in the first half and made it difficult for us to get out of the pressure towards our goal, but that's no excuse for the goal we conceded.
"If the whistle had gone beforer the goal, I'd have been happy because I'd have been happy to keep a clean sheet ahainst that wind.
"We've conceded a terrible goal from our throw-in. It was sloppy play and that's given them something to defend."
York City manager Nigel Worthington told BBC Radio York:
"You're playing against a very, very good side and to come here and take all three points is a very good achievement.
"But I'll reiterate that we've done today what we're good at and when we do that we can get good results.
"So that's the benchmark and in these conditions we've actually played some very good football.
"I was pleased with that and obviously delighted with the three points."
Fleetwood Town 01 Davies 15 McLaughlin 20 Taylor 06 Pond 13 Goodall 05 Roberts 08 Schumacher (Brown - 66' ) 04 Murdoch (Mandron - 65' ) 23 Ball 09 Parkin 18 Sarcevic Substitutes 07 Evans 12 Brown 14 Hogan 16 Cresswell 25 Jordan 28 Maxwell 34 Mandron York City 31 Pope 02 Oyebanjo 03 Davies 37 Reed Booked 15 Lowe 16 McCombe 12 Carson 10 Penn 19 Bowman 09 Fletcher 26 Hayhurst (Coulson - 83' ) Substitutes 07 Coulson 17 McDonald 18 Platt 20 Allan 24 Ingham 25 Dickinson 28 Puri
Ref: Fred Graham