Terms were not disclosed but the deal includes a $4 million salary this year and a $5.5 million club option for 2020 with a $1 million buyout, according to multiple reports.
Galvis, who can earn additional award bonuses, took a cut from his $6,825,000 salary in 2018.
The 29-year-old batted .248 with 13 home runs, 31 doubles, 67 RBIs and 8 stolen bases in 162 games for the San Diego Padres last season.
Galvis, acquired by the Padres from the rebuilding Phillies in December 2018, had been Philadelphia's starting shortstop for the previous three seasons and emerged as one of the sport's top defensive players at the position.
He batted .255 with 12 home runs, 61 RBIs and 14 stolen bases during the 2017 season, his sixth overall with the Phillies. He also was a National League Gold Glove finalist.
Galvis, listed at 5-foot-10 and 185 pounds, was suspended 50 games by Major League Baseball in 2012 for testing positive for a metabolite of Clostebol, a performance-enhancing substance.
To make room on the roster, Toronto optioned right-hander Danny Barnes for assignment.
The Associated Press contributed to this report.