Michael Keane's second-half header looked to have sentenced Cardiff to their second defeat in three home games.
But two minutes into time added-on substitute Gestede converted Andrew Taylor's cross to increase their lead over Hull at the top of the table to four points.
Cardiff came into the match looking to get back to winning ways after a recent wobble but both sides had chances in an end-to-end opening.
After Chris Wood forced a save out of home goalkeeper David Marshall in the ninth minute, City defender Matthew Connolly was at his best with a double block to deny Lloyd Dyer and David Nugent.
Two minutes later Cardiff midfielder Peter Whittingham swung in a low free-kick which was comfortable for former Bluebird Kasper Schmeichel as the home side looked to avoid just their third home defeat of the season.
Ben Nugent, retaining his place in the home side after an injury to Ben Turner, was next to threaten the Dane but his headed flick was plucked from the sky in the six-yard box.
Nugent's central defensive partner Mark Hudson suffered an injury scare shortly afterwards but following his return to the pitch he pulled off a fantastic recovery tackle to deny Wood as the New Zealand international ran through on Marshall's goal.
Dyer and Wood continued to threaten on the break for the Foxes, who had taken just one point from a possible nine prior to kick-off, and the latter threatened just before the break but the winger's effort was comfortable for Marshall.
Cardiff manager Malky Mackay rang the changes at half-time with Hudson, who had struggled on with his injury, and winger Craig Noone replaced by Kevin McNaughton and Craig Bellamy, who scored the winner when the sides met back in December.
The Scottish defender was involved almost straight away as his tackle denied Wood from close range.
Fraizer Campbell was then inches away from the game's opening goal when he failed to connect with a low ball into the box.
Wood continued to be the away side's main threat and he was denied when clear through on the hour mark by Marshall. The keeper pulled off a crucial save to tip the former West Brom man's effort around the post in arguably the best chance of the game to that point.
At the other end Aron Gunnarsson clipped the crossbar with a cross that almost found a way past Schmeichel as both sides continued to search for what would be a vital three points.
The woodwork would be rattled by the Foxes shortly after when Keane's header from Danny Drinkwater's corner hit the post. But the ball was eventually swung back in by Sean St Ledger and the Manchester United loanee made no mistake at the second attempt to head home from six yards out to delight the 976 travelling fans.
Cardiff introduced Gestede for Craig Conway in an attempt to force an equaliser and he nodded over a Whittingham cross with six minutes to go.
But the Frenchman made no mistake deep into added time to secure their second consecutive 1-1 draw.