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, which would have been harsh on Villa, with a curling effort which flew narrowly wide
TWEET OF THE MATCH:
"What a team
What a display
What a fightback
#COYF" - former Leicester striker Gary Lineker seemed to be pleased after the 3-2 win.
https://twitter.com/GaryLineker/status/643106014745763841
PLAYER RATINGS
Leicester
Kasper Schmeichel: 6/10
Ritchie De Laet: 7
Robert Huth: 6
Wes Morgan: 6
Jeff Schlupp: 6
Marc Albrighton: 6
Danny Drinkwater: 7
Gokhan Inler: 6
Riyad Mahrez: 8
Shinji Okazaki: 5
Jamie Vardy: 7
Subs
Nathan Dyer: 7
Leonardo Ulloa: 5
Ngolo Kante: 7
Aston Villa
Bradley Guzan: 6
Leandro Bacuna: 6
Micah Richards: 7
Joleon Lescott: 6
Jordan Amavi: 5
Carlos Sanchez: 5
Ashley Westwood: 6
Carles Gil: 7
Jack Grealish: 7
Scott Sinclair: 6
Gabriel Agbonlahor: 6
Subs
Jordan Ayew: 4
Rudy Gestede: 4
Alan Hutton: 3
STAR PLAYER
Riyad Mahrez
He was a constant thorn in Villa's side all afternoon with his pace, quick feet and trickery and was pivotal in dragging Leicester back from the brink
The Algeria international has been a joy to watch so far this season.
MOMENT OF THE MATCH
Jack Grealish's goal
What a moment for the young man
Took the chance with the composure of a seasoned pro - just three days after his 20th birthday
Perfect placement, textbook technique and sufficient power and fade
Shame for him that in the end it was not worth any points.
VIEW FROM THE BENCH
Gabriel Agbonlahor's inclusion was a bit of a surprise but presumably Tim Sherwood wanted to use his pace against Robert Huth and Wes Morgan
Behind him, Villa's attacking trio of Scott Sinclair, Grealish and Carles Gil rotated well and caused Leicester problems.
However, Claudio Ranieri replaced Shinji Okazaki with debutant Nathan Dyer at half-time, moving Mahrez into a more central position, and the Algerian was instrumental in the hosts rescuing their unbeaten start to the season.
MOAN OF THE MATCH
Mahrez again
The only blot on the 24-year-old's copybook when in the 82nd minute he appeared to roll on the floor in an attempt to get Jordan Amavi a second yellow card.
WHO'S UP NEXT?
Stoke v Leicester (Premier League, September 19)
Aston Villa v West Brom (Premier League, September 19)
Source : PA
Source: PA