However, Williams soon found his form and claimed the following five frames to lead before allowing O’Sullivan back in at 5-5.
But it was to be Williams' day as O’Sullivan struggled to find his rhythm in the deciding frame – potting just two reds – as the Welshman made breaks of 50 and 22 to advance into the last four.
"I haven't beaten him for so long, eventually I've got rid of that pain," Williams told worldsnooker.com.
"I was shocking for the first few frames and dragged Ronnie down, but after the interval I was a different player.
"It's an excellent win for me, even though Ronnie wasn't at his best. He's still the best player in the world."
O’Sullivan added: “"We both started poorly and I was struggling with my concentration. Then he played well to go 5-3. He's in good touch. At 5-3 I felt I had to make something happen, and that was the best I felt in the match."