Gallagher was drafted by the Chicago Cubs in the 12th round of the 2004 Major League Baseball Draft. In first pro season he went 1–2 with a 3.12 ERA over 10 games in with the Arizona League Cubs. Gallagher allowed 19 runs, 12 earned, on 38 hits in 34 innings, striking out 44 and walking 11. In 2005 Gallagher was selected as the Cubs minor league pitcher of the year. He played for the Peoria Chiefs and made the Midwest League All-Star Game and was voted by Baseball America as having the best breaking ball in the Midwest League. He went 14–5 with a 2.71 ERA in 26 games for Peoria, allowing 53 runs, 44 earned, on 107 hits over 146 innings. Gallagher struck out 139 and walked 55. He ranked first in the league in wins with 14, third in ERA with a 2.71 clip and fourth in strikeouts with 139. Gallagher also started one game for the Class-A AdvancedDaytona Cubs, scattering one earned run on six hits over five innings and striking out seven. Gallagher split time between the Double-A West Tenn Diamond Jaxx and Class-A Advanced Daytona. He went 7–5 with a 2.71 ERA, 30 runs, 26 earned, on 74 hits over 86 innings while striking out 91 and walking 55 with West Tenn. He also went 4–0 with a 2.30 ERA, 24 runs, 20 earned, on 75 hits in 78 innings while striking out 80 and walking 21 with Daytona. Gallagher made his major league debut on June 9, 2007, against the Atlanta Braves. During the week of April 20 – 27, 2008, Gallagher was named the Pacific Coast League pitcher of the week. The Cubs called him up to take the place of Rich Hill in their starting rotation after Hill struggled early in 2008.
Oakland Athletics
On July 8, 2008, Gallagher was traded from the Chicago Cubs as part of a six-player trade that saw the Cubs acquire Rich Harden and Chad Gaudin from the Oakland Athletics. With the A's he went 2–3 with a 5.88 ERA in 11 starts. He went 1–2 with an 8.16 ERA in 14 innings pitched in six games, two starts with the A's in 2009.
On July 7, 2010, Pittsburgh Pirates acquired Gallagher from the Padres for cash considerations. After the season, the Pirates outrighted Gallagher off of the 40-man roster to Triple-A, but invited him to 2011 spring training. He spent the entire season with the AAA Indianapolis Indians.
Gallagher signed a minor league contract with the Cincinnati Reds on December 9, 2011. He spent the year at Triple-A Louisville, where in 26 starts, he went 10-9 with a 4.92 ERA, striking out 84 in 139 innings.
On April 3, 2013, Gallagher signed with the Sugar Land Skeeters of the independent Atlantic League of Professional Baseball, where he made 4 starts before his contract was purchased by the Rockies.
Gallagher signed a minor league contract with the Colorado Rockies on May 14, 2013. He was assigned to Double-A Tulsa, where he made 12 starts, going 4-5 with a 3.00 ERA before being promoted to Triple-A Colorado Springs on July 26. He made 7 starts with Colorado Springs. In 23 overall starts in 2013, he went 8-8 with a 3.64 ERA, striking out 89 in 136 innings.
Sugar Land Skeeters
Gallagher signed with the Sugar Land Skeeters for the 2014 season. He became a free agent after the 2016 season.