The 6-foot-9, 320-pound lineman entered the league as an undrafted free agent in 2014. The former Army Ranger served two tours in Afghanistan.
Villanueva started 16 games for the Steelers in each of the last five seasons.
The Ravens traded two-time Pro Bowl offensive tackle Orlando Brown Jr. to the Kansas City Chiefs on April 23. They did not select an offensive tackle in last week's 2021 NFL Draft.
Villanueva protected quarterback Ben Roethlisberger's blind side at left tackle for the Steelers, but is likely to replace Brown as the Ravens' new right tackle.
All-Pro Ronnie Stanley and Ben Cleveland are expected to anchor the left side of the Ravens offensive line. Fellow free agent signing Kevin Zeitler is expected to play right guard. Bradley Bozeman is expected to play center for the Ravens in 2021.
Ben Powers, Patrick Mekari and Trystan Colon-Castillo are among the other offensive linemen on the Ravens roster who could push for spots in the starting rotation.