The versatile defender, who can play at centre-half or left-back, joins the League One club on a three-year deal.
Williams made his senior Villa debut last season and, according to his new club's website, he turned down a new deal in favour of a move.
"I needed to take this step," he told the Villa website. "I hope it's the right decision.
"I want to make a career for myself and I'm grateful for the great start I've been given by Aston Villa and coming through the Villa Academy.
"Bristol City were interested and it's a big club. I'm looking forward to the challenge.
"I have no issues dropping down to League One. The club's aim is to bounce back stronger and it's a great goal to have."