The extension, which begins in 2021, contains a club option for 2025. The four-year deal is worth $30 million, according to The Athletic.
Gonzales is about to begin his third full season with the Mariners after arriving in 2017 via a trade from the St. Louis Cardinals. Gonzales gets $1 million this year in the final season of a $1.9 million, two-year deal.
"Since joining the Mariners, Marco has been a model of consistency, quietly ranking among the most productive starting pitchers in the AL," Seattle general manager Jerry Dipoto said in a statement. "His presence, competitiveness, preparation and leadership make him a key part of our future."
Gonzales is coming off the best season of his career. He tied for the American League lead with 34 starts and was tied for fifth with 16 victories. His 3.99 ERA was the lowest of his career, and he set career highs in starts, innings pitched and strikeouts.
The 27-year-old was Seattle's Opening Day starter last year and is likely to hold that spot for years to come.
"This organization has a vision for winning a championship, and I am honored to be a part of their plans," Gonzales said. "This will only further motivate me and the passion that I have to compete and win. I do not take their commitment to me lightly, and I will always represent this team and this city with honor and pride."
By signing Gonzales to the deal, Seattle is banking on the left-hander still being among the better pitchers in the AL when the Mariners hope their rebuilding project comes to fruition. This season is likely to be another struggle after Seattle won just 68 games last year.
But the hope is Seattle's young prospects start the turn toward winning in 2021 with Gonzales at the top of the rotation.
Gonzales said recently that his role with a young team doesn't change his approach.
"I'm going to go out and try to win a ballgame every five days and be a good teammate, be a good leader and do things the right way," he said. "The world could be crumbling down around me and I don't think it would effect what I do in my job."
The Associated Press contributed to this report.