The 24-year-old joins the club who ruined his promotion dream last month.
Harrogate beat Brackley 3-0 in the National League North Promotion Final - and its Simon Weaver’s side who went up.
The 22-goal forward will now be playing for them next season and having already scored over 100 times in his career, more is expected from the 24-year-old.
He left Brackley after helped take the Saints to FA Trophy glory at Wembley.
Williams will be competing for places in Town’s forward line with Dom Knowles, Mark Beck and Jordan Thewlis.
He is Harrogate’s second summer addition following defender Callum Howe’s arrival from Port Vale.