Gagnon made his professional debut with the Helena Brewers, compiling an 8.05 ERA in 19 innings pitched. In 2012 he pitched for the Wisconsin Timber Rattlers and Brevard County Manatees where he was a combined 7–3 with a 2.83 ERA in 23 total starts, in 2013 he played for Brevard County and the Huntsville Stars where he pitched to a 7–13 record and 5.43 ERA in 26 starts between both teams, and in 2014 he pitched with Huntsville where he compiled an 11–6 record and 3.96 ERA in 28 starts.[5] Gagnon spent the 2015 season with both the Biloxi Shuckers and Colorado Springs Sky Sox, pitching to a 2–12 record and 6.67 ERA in 26 total games (19 starts) between both teams, and he returned to those two teams in 2016, going a combined 3–1 with a 4.48 ERA in 36 games (31 relief appearances).[6]
Los Angeles Angels
On December 13, 2016, Gagnon, along with Martín Maldonado, was traded to the Los Angeles Angels in exchange for Jett Bandy.[7] He spent the 2017 season with the Salt Lake Bees where he compiled a 1–1 record and 6.25 ERA in 31 games (ten starts).[8] He became a free agent following the season on November 6, 2017.[9]
Gagnon was called up to the Mets on July 10, 2018.[11] In 17 starts for Las Vegas prior to his promotion, he was 1–4 with a 4.67 ERA and a 1.26 WHIP.[12] Gagnon made his Major League debut in a July 10 start against the Philadelphia Phillies at Citi Field. He allowed six earned runs in 42⁄3 innings and hit a sacrifice fly.[13] Coincidentally, the starting pitcher for the Phillies in that game was Enyel De Los Santos, who was also making his Major League debut and earned the win for New York.
Gagnon was designated for assignment by the Mets on November 20, 2019, in order for him to pursue an opportunity in Korea.[14]
Kia Tigers
On December 10, 2019, Gagnon signed a one-year, $850,000 deal with the Kia Tigers of the KBO League.[15] He became a free agent following the season.
In 2023, Gagnon made 30 starts for Wei Chuan, posting a 13–7 record and 3.00 ERA with 155 strikeouts across 183.0 innings of work. Following the season, he was named the CPBL MVP award winner.[17] On February 6, 2024, Gagnon re-signed a two-year deal with the Dragons.