City were trailing and on course for a club record eighth successive Premier League defeat after Richarlison's first-half goal.
Inspired after the break, Vardy equalized before Bilal El Khannous scored the winner in five frenetic minutes.
Post-game, Vardy told the BBC: “It is big, and hopefully it stops the rot we have been in.
“We have been playing some decent football for probably half a game and it has let us down a bit. The lads there battled through for 90 minutes and it is credit too to the manager (Ruud van Nistelrooy) what he’s been doing on the training pitch.
“At times you want to be the team playing nice football, but at times during a game it is not on. We have all stuck together as a team. We knuckled down, stayed together and got the big win.
“As a striker you just want to score in every game and that is what I am trying to do."