The Wales centre-half had not played for five weeks due to a niggling ankle ligament problem, missing eight games in total for club and country.
Manager Michael Laudrup had initially hoped a fortnight of rest would be enough to cure the problem, but Williams' lay-off worryingly dragged on, and there were concerns he would miss the first Premier League battle for Welsh bragging rights.
However, the 29-year-old was fit enough to return to the starting line-up for Sunday's goalless draw with West Ham, turning in a typically assured display at the heart of the Swansea defence.
And he is already casting his sights ahead to this weekend's eagerly-awaited clash at Cardiff City Stadium.
"I felt good, it was a tough test for the ankle, but it stood up to it, so I was pleased," he said.
"The last time I had a spell out with an injury I think was in 2007. I like playing and I don't enjoy watching.
"I found it a bit strange and very frustrating, but I didn't want to rush it.
"It's pleasing to get 90 minutes under my belt. I didn't want to go straight into the derby because of the intensity of the game.
"It was nice because now I feel a bit more confident and now I've got a full week's training ahead.
"It's a massive game for obvious reasons, but we knew we had to concentrate on the West Ham game first.
"It was important, but now we can look ahead."
A second consecutive Premier League clean sheet was an ideal confidence boost for the Swansea rearguard, as they survived West Ham's set-piece onslaught.
While Laudrup's side did not always look comfortable in the face of an aerial bombardment, they managed to survive, and it is an area they will need to be strong in against a Cardiff side including Peter Whittingham's dead-ball expertise.
"I'm very pleased with the clean sheet, but obviously we would have liked to have won the game," said Williams
"It was a tricky game because they were sitting in without the striker so it would have been easy for the defence to have switched off and then been hit on the counter attack.
"The pleasing thing was that we didn't concede from so many set pieces.
"We did ride our luck at times but we got a clean sheet in the end one way or another.
"I think this year we're a lot stronger at defending set pieces and that's pleasing because that's what we've worked on and talked a lot about.
"You can't afford to switch off because there aren't a lot of teams that aren't strong from set pieces.
"It's something we've spoken about at the start of the season and I think we've tightened up a lot."
- Sports & Recreation
- Michael Laudrup
- Premier League