Last season, Gonzalez played for the Orioles and Rangers and had a combined 4.39 ERA in 56 games.
"He is a veteran relief pitcher who has experience as a closer and as a setup guy. We signed him to a Minor League contract," general manager Mike Rizzo said. "We want to improve our depth in the system. We want him to be an option if we need him."
Gonzalez, 33, is 17-21 with 74 holds, 56 saves and a 2.94 ERA in nine big league seasons with Orioles, Rangers, Braves and Pirates.