Gonzalez, who hit .269 with nine homers and 38 RBI in 109 games for the Tampa Bay Devil Rays last season, can earn up to $1 million in performance bonuses, getting the full amount if he has 130 starts and 500 plate appearances.
He was the Devils Rays' starting third baseman on opening day and made 91 of his 97 starts at that spot. He started six games at shortstop, where he has played most of his 12-year career.
"This is a guy that has had a lot of success at the major league level as an everyday player," Phillies general manager Pat Gillick said. "He's a professional who will add some much-needed depth to our infield and provide a strong right-handed bat off our bench."
A right-handed hitter, Gonzalez has a .244 batting average with 137 homers and 535 RBI in 1,376 games for the Blue Jays (1994-2001), the Cubs (2002-2004), Expos (2004), Padres (2004) and Devil Rays (2005).
Gonzalez hit a career-high 20 homers with the Cubs in 2003, but batted only .228 that year. His best all-around season came with Toronto in 2001 when he hit .253 with 17 homers, 76 RBI and stole 18 bases.
Gonzalez is a superb defensive player who ranks seventh among active shortstops with a .975 career fielding percentage. He twice led the league in fielding percentage at that position (1997 and 2003).
Gonzalez also has eight career extra-inning homers, which is tied for sixth-most among active players, and five career walk-off homers.
His arrival could end Tomas Perez's six-year tenure with the Phillies. The versatile Perez hit just .224 over the last two seasons. Both Perez and speedy infielder Matt Kata could get a chance to earn roster spots by playing the outfield in spring training. The Phillies have an opening for a fifth outfielder after trading Jason Michaels to Cleveland for reliever Arthur Rhodes last month.
Philadelphia has 40 players on its 40-man roster. The Phillies have invited catcher John Vanden Berg to spring training as a non-roster player. He was selected in the Triple-A portion of the winter meeting draft in December.