The ball had appeared to have run out of play before David Nugent cut back for Vardy to convert from close range despite Boro's complaints.
© Getty Images
Shay Given saved a penalty to keep the visitors in the contest, but it was only a brief reprieve as Richie de Laet headed in a second to see Leicester take advantage of Queens Park Rangers and Burnley's inactivity.
Heavy rain and hailstones hampered the first half between the division's two in-form sides as Boro had the best of the few goalscoring chances, with Lukas Jutkiewicz firing a third-minute shot wide.
Leicester, in search of a seventh straight league victory, improved going forward in the second period as they adjusted to the conditions and Nugent provided Vardy with the opening goal on 52 minutes.
He pinched the ball from Daniel Ayala, who was adamant that it had already gone behind for a goal kick, to square for his strike partner to thump home his ninth of the season from inside the box.
Vardy continued to be in the thick of the action and his pace during a determined charge into the area drew a trip out of Boro captain Rhys Williams.
It was Leicester's 14th penalty of the season, but Nugent could not convert from 12 yards as Given kept out his poor spot kick.
Ayala, still frustrated by the manner of Leicester's first goal, looked to take revenge on Vardy with a clattering challenge near the byline which led to the hosts' game-killing second. From the resultant free kick, Danny Drinkwater delivered to the back post for De Laet to head home.