Gallardo, 31, went 5-10 with a 5.72 ERA in 18 games (22 starts) this season, his first with the Mariners. He also recorded a save, the first of his 11-season career.
Gallardo spent the first eight seasons of his career with the Milwaukee Brewers before one-year stays with the Texas Rangers, Baltimore Orioles and Mariners. He has a career record of 113-93 with a 3.93 ERA.
Iwakuma, 36, was 0-2 with a 4.35 ERA in six starts. He was placed on the disabled list on May 10 with shoulder trouble and didn't return. He had surgery on his right shoulder on Sept. 27, and the Mariners said at the time that he wasn't expected to resume throwing for five months.
He has a career record of 63-39 with a 3.42 ERA in 150 games, all with the Mariners, over six major league seasons.
The Mariners also claimed utilityman Andrew Romine off waivers from the Detroit Tigers on Thursday. Romine appeared in a career-high 124 games last season, finishing with a .233 batting average, four home runs and 25 RBIs.