Doncaster-born Williams, 31, has played over 250 games in the Football League for Scunthorpe United, Sheffield United, Peterborough, and Reading.
He joined Guiseley at the start of the 2016/17 season after a spell in the Indian Super League with Kerala Blasters.
Defender Connor Brown, meanwhile, has now completed a permanent switch to Bootham Crescent after playing four games on loan, also from Guiseley.
Brown (pictured) initially joined York last month on loan until the end of the season.
Born in Sheffield, he started his career at Sheffield United before joining Oldham Athletic where he stayed for over four years and made ninety-eight appearances.
He joined Guiseley in September 2016 after being released by the Lancashire side and has made over 50 appearances for the West Yorkshire club.
The 26-year-old has also played on loan for Carlisle United, Hinckley United, and Eastwood Town.