Williams – the oldest player since 2010 to reach the quarter-finals - won the first frame of the match with a break of 70, only for O’Sullivan to respond with a century – the 1054th of his career – and then a 70 of his own to move ahead.
'I never saw the plant!' - Ronnie O'Sullivan produces masterful shot
Williams levelled up before the mid-session interval and then took advantage of some erratic play from O’Sullivan after the break to move clear.
He won a scrappy fifth frame and then rattled off a quick break of 72 to extend his lead to 4-2.
Mark Williams seals excellent session with century break
It looked as though O’Sullivan would respond, but he missed a routine pink at 41-0 and then, when he got back to the table, made the unusual choice of not putting Williams in again after a snooker and instead tried for a more difficult snooker.
'I can't believe he's playing this!' - Ronnie O'Sullivan makes bizarre safety choice
The decision didn’t pay off as Williams won the frame and then finished with an excellent 137 break in the final frame.
McGill leads Maflin by six
Anthony McGill leads Kurt Maflin 7-1 after a one-sided opening session of their quarter-final.
McGill, who finished his previous match against Jamie Clarke in the early hours of Monday morning, looked in fantastic touch as he dominated proceedings, winning the opening three frames with breaks of 53, 63 and 78.
Maflin won the fourth frame and also looked set to win the eighth frame at 54-0 ahead, only to miss a routine red to the middle and allow McGill to clean up.