In corresponding moves, Chicago recalled right-hander Dillon Maples and right-hander Rowan Wick from Triple-A Iowa.
Hamels left his start at Cincinnati on Friday night after one inning with a left oblique strain. He has been a rock for the Cubs this season, going 6-3 with a 2.98 ERA.
Gonzalez, 33, hit .175 (7-of-40) with one homer and three RBIs in 15 games after signing a minor league deal with the Cubs in early June.
This marks Maples' third stint with the Cubs this season. He has thrown 5 2/3 scoreless innings in seven relief appearances for them. He had a 4.95 ERA in 19 appearances at Triple-A.
Wick is also joining the Cubs for the third time this year. Had has a 2.45 ERA in three appearances, allowing one run in 3 2/3 innings. He has posted a 2.22 ERA in 20 appearances at Triple-A.