The Wales captain has played 73 matches and scored three goals for the Toffees since arriving at Goodison Park from Swansea City in the summer of 2016.
New Everton boss Marco Silva was reportedly open to parting ways with Williams and, on Thursday evening, both clubs confirmed that the 33-year-old had linked up with the Championship side.
"We have two very good senior central defenders in Ryan Shawcross and Bruno Martins Indi but I felt it was important we brought in another experienced player to add to the competition for places," Stoke boss Gary Rowett told the official club website.
"Having spoken to Ashley he feels like he has a point to prove and has a real hunger. He knows many of our players, knows what we're all about as a club and will fit straight in to our culture.
"He has gone for big money in the past and had a fantastic a career so far and experience in that position can be key because it can help you read the game."
Williams could potentially make his Stoke debut in Saturday's Championship opener at Leeds United.