The Foxes looked like losing their unbeaten start to the season after a couple of wonderful curling efforts from Jack Grealish, his first goal for Villa, and Carles Gil put the visitors in the driving seat.
But goals from Ritchie De Laet, whose effort was given with the aid of goal-line technology, Jamie Vardy and substitute Dyer, making his debut following his loan arrival from Swansea during the international break, saw Claudio Ranieri’s men snatch victory from the jaws of defeat.
Winger Dyer remained on the floor for a couple of minutes after clattering into goalkeeper Brad Guzan when heading the 89th-minute clincher, but eventually got to his feet to take the acclaim.
There was a let-off for Leicester early on when Gil sent Gabriel Agbonlahor racing clear and his low cross to the far post was just beyond the reach of Scott Sinclair, who at full stretch poked the ball wide.
The Foxes also had an early chance when Wes Morgan shrugged off Jordan Amavi to meet Marc Albrighton’s cross but powered his header over the crossbar.
Grealish spurned a terrific chance to give Villa the lead in the 24th minute when he steered his shot straight at Kasper Schmeichel. But when presented with a similar opportunity just before half-time, the youngster did not make the same error.
Leicester struggled to clear a corner and the ball bobbled around a crowded penalty area before breaking to the edge of the box where Grealish curled home a lovely right-footed shot beyond a possibly unsighted Schmeichel.
The sheer joy on Grealish’s face was there for all to see as he ran towards his manager Tim Sherwood. He had longed for that first goal for the club since he was a child playing football round the back of the Aston Social Club in the shadow of Villa Park.
Leicester emerged for the second half full of vigour. Jeff Schlupp burst into the box and cut the ball back for Vardy whose instinctive back-heel flick rolled narrowly wide.
Vardy then raced clear into the area but Micah Richards remained with him and got a crucial block on the striker’s shot.
It was somewhat against the run of play when Villa extended their lead in the 63rd minute. Agbonlahor broke free down the left and played a square pass to Gil who guided a lovely curling shot around defender Robert Huth and back into the top corner of the net from 22 yards.
Midway through the second half Leicester had a big shout for a penalty turned down by referee Mike Dean when Vardy’s burst into the box was halted by Leandro Bacuna.
Shortly afterwards De Laet halved Leicester’s deficit. His near-post flick from Riyad Mahrez’s corner looked like it might have been headed safely off the line by Ashley Westwood but goal-line technology alerted Dean that the ball had crossed.
Vardy then sent a shot into the side-netting as Leicester sensed they could still get something from the game.
They were right – they could. Mahrez’s mazy run forward set up Danny Drinkwater and his low cross was poked home by Vardy with eight minutes still to play.
The pressure on Villa was relentless and Dyer, on at half-time for Shinji Okazaki, immediately endeared himself to Foxes fans when he bravely got between two Villa defenders to head home before running into Guzan.
Mahrez almost added some gloss to the scoreline with a curling effort which flew narrowly wide.