The job had been offered to head of youth David Tuttle, but he decided to turn the offer down and remain in his current post.
Williams joined Swindon in the summer, and had been made club captain. He even played in goal for the last 15 minutes against Grimsby after Peter Brezovan had been taken off injured.
Williams will be in charge of team against Lincoln City on Saturday while the club make a decision on who should replace Dennis Wise and Gus Poyet who have now moved to Leeds United.