Martyn Waghorn's last-minute winner maintained Leicester's play-off push and gave them a fifth straight victory.
The Foxes dominated the opening period and were ahead through Yakubu's fourth goal in six games, a simple finish from six yards after a David James error.
Bristol City began the second half well and levelled through Marvin Elliott who bundled in a corner at the far post.
Leicester struggled for fluency but substitute Waghorn hit an unstoppable last-gasp drive into the top corner.
Sven-Goran Eriksson's side should have made life far easier for themselves and could have been ahead after only 70 seconds.
Richie Wellens played a quick free-kick out to the right where on-loan full-back Kyle Naughton had found space and the Tottenham defender's square ball was perfectly weighted only for Yakubu to fire wildly over from 10 yards.
The match featured both goalkeepers from the Euro 2004 encounter between England and Portugal, with James up against Ricardo.
James made a fine save to his left to keep out a Paul Gallagher effort and another to claw away a Sol Bamba header, but when the ball was played back in he could only palm it straight to Yakubu who calmly slotted home.
Leicester continued to threaten with Darius Vassell shooting wide and James saving bravely at the feet of Andy King after Yakubu had played a fine pass behind the defence.
But the visitors battled their way back as Elliott met Jamie McAllister's corner and the ball found the net despite the efforts of Richie Wellens on the line.
When time appeared to be running out for the home side, a Steven Caulker clearance hit the back of King and Waghorn latched onto the loose ball before firing a memorable strike past James at his near post.
Live text and stats
Friday, 18 February 2011
04 Van Aanholt
19 Wellens (Abe 78)
07 Gallagher (Dyer 64)
24 Yakubu yellow card
37 Vassell (Waghorn 84)
05 Miguel Vitor,
03 McAllister (Nyatanga 64)
09 Clarkson (Campbell-Ryce 76)
15 Keogh (Maynard 59)
Ref: BoothAtt: 28,768
Attempts on target
Attempts off target
90:00+5:33 The referee brings the game to a close.
90:00+3:19 Free kick awarded for an unfair challenge on Kalifa Cisse by Kyle Naughton. Direct free kick taken by David James.
90:00+1:27 GOAL - Martyn Waghorn:Leicester 2 - 1 Bristol City Martyn Waghorn grabs a goal from deep inside the penalty box to the top right corner of the goal. Leicester 2-1 Bristol City.
90:00+1:03 The offside flag is raised against Nicky Maynard. Pereira Ricardo takes the free kick.
90:00+0:05 Kyle Naughton produces a cross, Headed effort from deep inside the penalty area by Andy King goes harmlessly over the crossbar.
88:40 Nicky Maynard concedes a free kick for a foul on Souleymane Bamba. Direct free kick taken by Pereira Ricardo.
86:27 Albert Adomah fouled by Matt Oakley, the ref awards a free kick. Louis Carey takes the direct free kick.
85:00 Free kick awarded for a foul by Lewin Nyatanga on Martyn Waghorn. Pereira Ricardo takes the free kick.
83:42 Substitution Martyn Waghorn is brought on as a substitute for Darius Vassell.
83:28 Albert Adomah has an effort at goal from just outside the penalty box which goes wide of the left-hand post.
82:23 Inswinging corner taken by Jamal Campbell-Ryce from the left by-line, clearance made by Ayegbeni Yakubu.
81:55 Martyn Woolford takes a shot. Blocked by Ben Mee.
80:50 Kyle Naughton gives away a free kick for an unfair challenge on Martyn Woolford. David James restarts play with the free kick.
79:34 Martyn Woolford is ruled offside. Free kick taken by Pereira Ricardo.
77:57 Substitution Yuki Abe is brought on as a substitute for Richie Wellens.
75:03 Ayegbeni Yakubu concedes a free kick for a foul on David James. Free kick taken by David James.
75:03 Substitution Jamal Campbell-Ryce joins the action as a substitute, replacing David Clarkson.
75:03 Booking Ayegbeni Yakubu booked.
73:39 Kalifa Cisse challenges Souleymane Bamba unfairly and gives away a free kick. Richie Wellens crosses the ball in from the
72:38 Outswinging corner taken by Patrick Van Aanholt from the left by-line, Kalifa Cisse manages to make a clearance.
71:41 The assistant referee flags for offside against Lloyd Dyer. David James takes the free kick.
70:21 Outswinging corner taken by Martyn Woolford.
67:51 Effort on goal by Kalifa Cisse from long range goes harmlessly over the bar.
66:20 Corner taken by Martyn Woolford from the right by-line.
65:59 Albert Adomah takes a shot. Save made by Pereira Ricardo.
64:22 Free kick awarded for a foul by Lloyd Dyer on Louis Carey. Louis Carey takes the free kick.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.