Williams, 45, put together runs of 97, 90, 55, 67, 90, 74, and 75 to oust the 14 seed but the three-time world champion had to come through a nail-biting epic, though, putting together a break of 74 in the 21st frame to edge ahead 11-10.
He had been 9-8 down after the first frame of the day, when Bingham made a break of 70, but surged back to win the next two.
World Championship
'I need to be patient' - McGill on defeat to Bingham at Crucible
28/04/2021 AT 19:30
Bingham got a break of 51 to level up at the mid-session interval, but Williams won five of the last seven frames to secure his place in the next round, where he will play either Ronnie O’Sullivan or Ding Junhui.
“I would love to play Ronnie in the next round because we grew up together as juniors and we haven’t played here for a while,” Williams said afterwards.
I would have to play out of my skin and even if I did it still might not be enough. What’s the worst thing that could happen? If I lose 13-0 I’ll just go home. All the pressure would be on Ronnie and I would just enjoy the experience.
Elsewhere, defending champion Judd Trump fought back to lead his second-round match with Bingtao Yan 9-7.
Having trailed his 20-year-old opponent 5-3 after the first session in their best-of-25 encounter, Trump put in a virtuoso performance to move closer to a spot in the next round. The world champion produced runs of 88, 73, 93 and 52 to lead 9-7 ahead of the resumption of their match at 20:00.
The Bristolian reeled off six frames on the spin to lead 9-5 as the match threated to turn into a procession but Yan, who has lost all five previous meetings with Trump, claimed the last two frames of the session to stay in touch. The winner of this match will be rewarded with a quarter-final encounter against either Martin Gould or Kyren Wilson.
Trump will be wary of the threat posed by Yan, who he described as a future world champion ahead of their tie, saying: "Yan is very mature for his age and he doesn’t go for anything stupid. He takes his time and he has certainly got a chance of being world champion in the future."
World Championship
'Just can't wait' - Emotional Bingham on reaching semi-finals
28/04/2021 AT 19:28
World Championship
'Brilliant pot' - Trump sinks outrageous long red from cushion
28/04/2021 AT 19:25