From 5-3 behind going into the evening, Hawkins drew level at 7-7 and the underdog was looking to have shed the early nerves that affected him.
The 34-year-old world No 14 from Kent fired in back-to-back breaks of 83 and 133 to give O’Sullivan plenty to think about.
The reaction from O’Sullivan to the encroaching danger was instantaneous and dazzling as he fired in 103 and 106 and then won the final frame on a black ball to surge 10-7 ahead.
After runs of 113 and 100 in the afternoon, O’Sullivan has taken a place in snooker’s record books as the player with the most World Championship centuries, edging two ahead of Stephen Hendry’s total of 127.
He is also bidding to become the first player since Hendry in 1996 to successfully defend the title in Sheffield.
Were Hawkins to lift the trophy tonight, it would rank as surely the greatest upset in a World Championship final since Joe Johnson beat Steve Davis in 1986.
There was a long way to go in the best-of-35-frames final though before 80-1 pre-tournament outsider Hawkins could start to think of lifting the trophy but the level of his performance was defying widespread expectations that O’Sullivan would cruise to a fifth world title.
For the first time in the tournament, O’Sullivan has trailed in a match. But from 3-2 behind this afternoon he powered in a 76 and his two early centuries.
If this is to prove his final World Championship, as he has suggested, O’Sullivan would like to leave more great memories before bowing out. With spectators on their feet, O’Sullivan had been roared into the arena for both sessions.
Many in the crowd had come in the expectation of an O’Sullivan masterclass, willing him to dominate, but Hawkins, in the biggest match of his life, had no such inclination.
In the afternoon Hawkins made an 88 break and followed it with an exquisite 81, when with the black and pink unavailable he adeptly piled on the points by repeatedly going up for the blue.
Coached by the 1979 world champion, Terry Griffiths, Hawkins was able to call on the Welshman’s expertise and experience in the intervals.
Earlier, first-time finalist Hawkins felt the full force of an O’Sullivan onslaught after having the impudence to edge ahead.
For the first time in the tournament, O’Sullivan trailed, with Hawkins surging from 2-0 behind to 3-2 in front as his big-match nerves settled.
But back came the defending champion in scintillating fashion to take a 5-3 advantage into the second session.
At 3.47pm on the penultimate day of this marathon event Hawkins inflicted a chink in his armour. A frame-winning break of 50 from Hawkins to reach 3-2 caused tongues to wag, as the widely anticipated stroll to the title began to look rather treacherous.
O’Sullivan began strongly with breaks of 74 and 92 securing a two-frame lead. Hawkins was wobbling, with the occasion far greater than any the 34-year-old world No 14 from Kent has known in his 17 years as a professional.
But Hawkins drilled in a superb long red at the start of frame three and made it count by making a break of 88, following it with a remarkable 81 which he skilfully built around the blue ball, with pink and black both unavailable.
Hawkins then returned from a dressing-room pep talk at the interval from Griffiths, to move in front.
But in the space of barely half an hour O’Sullivan rattled off three frames, looking silky smooth even though he was far from happy with the way the table was playing, grumbling to himself and sharing his view with Hawkins as they departed the arena. More than once in the session he had swept the baize and side cushions with his hands, convinced they were unsuitable.
He admitted he has come close to cracking up over the last fortnight after seeing off Judd Trump in the semi-final.
O’Sullivan played just one match this season before rolling up in Sheffield for his 21st crack at Crucible glory, having decided in November to skip the rest of the season.
By late February he had reconsidered, with O’Sullivan stating this week that he returned to resolve a cash-flow problem, with school fees overdue, but planned to retire for good after fulfilling a 10-tournament sponsor’s contract.
“It doesn’t seem like you’re being pushed but there are times out there where you’re that close to cracking,” he said.
“Then something will happen and you’ll pull ahead and that’ll give you belief and confidence, but in every match there has been a point where I’ve felt, ‘This could be slipping, this could be cracking’.”
O’Sullivan polished off a comfortable 17-11 win over Trump.
Hawkins beat Ricky Walden 17-14 in their semi-final.