The centre-back penned the fresh terms with the Reds before departing to spend the 2021-22 campaign with the Championship club having completed his temporary switch on transfer deadline day.
Academy graduate Williams made 19 senior appearances for the Reds last season after debuting in September 2020, including playing nine times in the Premier League and on six occasions in the Champions League.
His partnership with Nathaniel Phillips in the final stages of the campaign was instrumental in securing a third-placed finish and a return to the Champions League for Jürgen Klopp’s side.
Williams, who spent 2019-20 on loan at Kidderminster Harriers, will now seek to gain more first-team experience at the Liberty Stadium, with his loan move subject to international clearance.