Gonzalez was hitting .224 with eight RBIs in 23 games for Scranton.
"Hopefully he'll bring some offense - a little bit more offense," Girardi said. "He's a shortstop that can play anywhere, so that gives us some freedom."
This is Gonzalez's second stint of the season with the Yankees after he played in three games with the team in mid-May. He went 3-for-9 in that stretch.
Gonzalez began the season with the Cubs before they designated him for assignment. The Yankees then acquired him from Chicago for future considerations.
Girardi said Gonzalez will be used as a utility infielder for the Yankees, with Nix starting at shortstop and David Adams continuing to start at third base.
David Wilson, Josh Vitale and Chris Iseman are associate reporters for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.