The deal is worth $14 million and includes $8 million fully guaranteed, a source told ESPN's Adam Schefter.
Baltimore sent Brown to the Kansas City Chiefs on April 23 in exchange for a package that included the Chiefs' 2021 first-round pick.
Villanueva will move to right tackle after playing on the left side of Pittsburgh's offensive line for the last six seasons. He made the Pro Bowl in 2017 and 2018.
Pro Bowler Ronnie Stanley is set to return to the Ravens' left tackle spot after a season-ending ankle injury in November. Brown took over from Stanley but didn't want to move back to right tackle and asked for a trade from Baltimore.