Former Middlesbrough man Yakubu put Leicester 2-1 in front at half-time at The Riverside with close-range finishes on five minutes and in injury time with Marvin Emnes replying for Boro.
The on-loan Everton forward netted his third four minutes into the second half before Rhys Williams made it 3-2 with a 25-yard shot.
The Foxes looked like hanging on for the win with goalkeeper Chris Weale saving Julio Arca's penalty despite City playing out the last 13 minutes with 10 men after Jeffrey Bruma was sent off before McManus nodded home.
Despite not picking up all three points, Sven-Goran Eriksson's men moved to within four points of the top six whereas Boro, now unbeaten in four, remain nine points clear of the drop zone.
Leicester made the better start and created their first chance after two minutes with debutant Diomansy Kamara heading over from 10 yards.
The Foxes then took the lead when Richie Wellens' cross from the right was tapped in by Yakubu.
However, their lead only lasted nine minutes as Boro equalised against the run of play.
Patrick Van Aanholt's poor pass to Matt Oakley resulted in him being robbed by Richard Smallwood who played
in Emnes for a smart finish across Weale from 12 yards.
The away side nearly regained their lead after 25 minutes. Wellens squared to Yakubu but this time his bundled effort was cleared by Andrew Davies.
Van Aanholt then almost made up for his earlier mistake as his shot was well saved by home goalkeeper Paul Smith.
More Leicester defensive mistakes almost let in Scott McDonald, Weale coming to the rescue before Boro came close again 11 minutes before half-time, Smallwood missing when well placed
But the Foxes then made it 2-1 in first-half stoppage time as Paul Gallagher's corner was headed back across goal by Bruma for Yakubu to poke home his second.
Leicester started the second period as they began the match with Gallagher's flick-on finding Kamara whose shot was kept out by Smith.
They did not have to wait long for their third goal though with Yakubu completing his hat-trick after 49 minutes as he latched on to Vassell's ball over the top before beating Smith from 12 yards.
Boro were back in it six minutes later through Rhys Williams who flicked the ball up before volleying into the bottom corner from 25 yards.
Substitute Merouane Zemmama came agonisingly close to making it 3-3 on 65 minutes with a 30-yard free-kick that hit the post.
They were then awarded a penalty following Bruma's handball but Arca's spot-kick on 76 minutes was tipped over by Weale before Bruma was sent off for a second yellow card.
Emnes then hit the upright and it did not look like being Tony Mowbray's side's day until McManus' powerful last-gasp header from Tony McMahon's corner.