The 27-year-old Glaswegian dug in from 7-3 and 8-5 adrift to beat Ryan Day 10-8, reeling off five frames in a row as his Welsh opponent crumbled.
Qualifier Day made breaks of 141 and 145 in Wednesday’s first session, but that early fluency deserted him, and he squandered chances to make it 9-9 before McGill stumbled over the winning line.
McGill told himself at 8-5 behind that he needed to give the remaining frames all he had, and he returned from the mid-session interval ready for a fight to the finish.
“It’s the World Championship, it’s a tournament worth trying in,” he said. “You lose most of the matches from the position I was in, 99 per cent probably.
“But you’d lose them all if you gave up and that kind of happened last year. I was playing Stephen Maguire and I was 7-2 down and never settled. I had a bit more fight in me this year and anything can happen.”
McGill has identified potting as a flaw in his game, and for a snooker player at this level that leaves him vulnerable to any player, with world No 3 Ding sure to be firm favourite when their last-16 match begins on Sunday.
“My potting is just not good enough and the chances are I’ll get found out in the next game, but it’s just good to be still involved,” McGill said.
“Ding is one of the best break builders there has ever been.
“I’m in for a tough fight, but at least I’m in one. I’ll need to pick it up because you can dig in and all that, but eventually you have to play some good snooker.”
Frustrated Day said: “It’s going to be a good month or so before I pick up the cue again, but I’m not really thinking about it now.
“I’m just going to have a bit of a break, and go again at the start of next season.”
Mark Allen moved into an early lead in his second-round clash with Joe Perry.
The left-hander from Antrim edged an absorbing first session 5-3 against the Cambridgeshire man, who knocked out defending champion Mark Selby on the opening day of the tournament.
Allen made breaks of 94, 99, 67, 73 and 50 as the best-of-25-frame contest got under way.
He and Perry will play to a finish across morning and evening sessions today.