The 25-year-old moves to Brunton Park as a replacement for Kieren Westwood, who recently completed a transfer to Championship outfit Coventry City.
Cumbrians boss, John Ward, told the club's official website: "It was obvious once Keiren left that the goalkeeper position was going to become a priority for us.
"We wanted to bring someone in who would provide the right level of competition for a starting place in our first team, we think we've got that with Ben.
"He's here to fight for his place and to show us what he can do, we're very pleased that he has joined the club."
Williams started his career as a trainee with Manchester United, before sealing a permanent switch to Crewe in the summer of 2004 following loan spells with Coventry, Chesterfield and the Alex.