Martyn Waghorn’s first-half goal had looked to have sent United to an 11th home defeat of the season, only for Danny Webber to equalise with eight minutes remaining.
But, with seconds left on the clock, Panayiotou touched in Ben Marshall’s effort, leaving home manager Neil Warnock and his players to confront the linesman about an alleged offside.
Warnock’s fury may have been more about a season of underachievement at Elland Road than the goal itself, but the veteran boss – who has promised a summer of change – may hear more about the incident after he appeared to throw his chewing gum at the official at the full-time whistle.
And, while 17-year-old Panayiotou may have won it for Leicester, their manager Nigel Pearson – like Warnock a mid-season appointment – will be well aware of the hard work ahead this summer after his big-spending club failed to make their expected promotion push.
Both will hope for better next season but, with so little a stake today, it was of no surprise that the goals apart, action was thin on the ground.
Of the two, Leeds started the better, with Robert Snodgrass’ volley on the slide blocked by former United keeper Kasper Schmeichel, and Luciano Becchio wasting a one-on-one when he somehow chipped into Schmeichel’s hands from 10 yards.
But, with a large number of Warnock’s starting line-up already knowing they will be elsewhere next season, sustained enthusiasm was hard to come by and Leicester grew into the game with Liam Moore’s cross zipping across the six-yard box and narrowly evading everyone.
Leeds briefly threatened again as Adam Clayton’s shot was blocked by Wes Morgan, but Leicester were not having to work too hard to keep them at bay and quickly took control.
After Marshall’s free-kick had been theatrically saved by Andy Lonergan, they took a 39th-minute lead after a catalogue of Leeds errors.
Veteran midfielder Michael Brown kicked off the farcical chain of events, spooning a regulation clearance high and back towards his own goal. Even then, Danny Pugh should have swept things up but, as the left-back missed the ball and fell over, Waghorn pounced and ran on to slot past Lonergan with ease.
The same player rapped a close-range volley into Lonergan’s hands four minutes after the half-time break, while Lloyd Dyer would have made it two had his length-of-the-field counter-attack run not ended with his shot being defected over by Pugh.
With the season trickling away for both, opportunities were even rarer than they had been in the first half, with Marshall the only player to even try his luck when he twice fired over from distance.
Substitute Mikael Forsell did work Schmeichel from 12 yards before, almost completely unexpectedly, Leeds levelled with eight minutes left.
Snodgrass was the architect, running at the heart of Leicester’s defence and standing a ball up for Forsell. When possession fell back to him he clipped an effort beyond Schmeichel and, even though the ball was headed for the goal, Webber made sure from a yard.
There was still time for more drama, though, with Panayiotou making for a controversial finish when he touched in Marshall’s edge-of-the-box effort.