The Rocket won his first-round match with Robert Milkins in 53 minutes on Monday night but he was given a far stiffer challenge by the Chinese teenager, who thrashed him 6-1 earlier in the season.
O'Sullivan blasted out of the blocks with a 121 break only for Bingtao to hit back with runs of 54 and 71 to edge ahead 2-1 before the five-time world champion restored parity.
His 18-year-old opponent produced a fine break of 84 to edge ahead again and looked on course to complete victory - and avenge last year's defeat to O'Sullivan in this event - when among the balls in the sixth frame.
However a costly miss was seized on by the Rocket with a clearance of 75 and he went on to take a scrappy deciding frame to reach the quarter-finals.
O'Sullivan told ITV: "I think there are only four or five players on the circuit who have got any bottle.
"John Higgins has it, Stephen Hendry had it in abundance, Ding Junhui and Mark Selby have a bit of it. Other than that, they all get a bit flaky under the cosh."
Higgins out
Despite praise from O'Sullivan, Higgins could not come through in a final frame decider as he lost to Xiao Guodong -
who now goes on to face the Rocket.
In another 4-3 scoreline, Guodong came out on top as he made a break of 55 break in the decider to go through.
Stephen Maguire also came through a final-frame decider to defeat recent Shoot Out champion Michael Georgiou.
Shaun Murphy got the better of Jack Lisowski 4-2.
Earlier in the day Mark Selby scraped through his opening-round clash with Jimmy Robertson 4-3 and he'll next face Neil Robertson.
The world number one will feel fortunate to still be in the tournament after Robertson spurned the first chance in the deciding frame but he showed his class with a break of 75 to progress.
Stuart Bingham, who has just returned from a three-month suspension for breaching betting rules, secured a fine 4-2 victory over an in form Mark Williams while Ding Junhui brushed aside 2016 Northern Ireland Open champion Mark King 4-1 to secure his last 16 place.
Ding will face Mark Joyce in the last 16, who came from 3-1 down to defeat Masters finalist Kyren Wilson 4-3.
Related snooker links