Williams, 35, is expected to give Baltimore a veteran replacement at left guard for Ben Grubbs, who signed with the New Orleans Saints as a free agent. Williams played the last eight years for the Cincinnati Bengals.
"Bobbie is a guy who has been in the league for a long time," Ravens coach John Harbaugh said in a statement. "We've played against him, and we like his style of play and his demeanor as a person and as a player. We're excited to have him as a member of our team."
Williams missed the first four games of last season after being suspended by the NFL for violating its policy on performance-enhancing substances. He then was sidelined for the final three games of the regular season after breaking his ankle.
Williams started 118 games total for the Bengals.
"It is going to be interesting to say the least, but I'm pretty sure it is going to be fun," Williams told the Cincinnati Enquirer when asked about facing his former team this season. "It will be familiar faces, it will just be different color uniforms."
The Ravens had little experience at guard before signing Williams. They used a second-round pick in April's draft on Iowa State's Kelechi Osemele, who has been working at left guard with the team.