Carlos Pena had three hits and scored twice for the Astros, who also got two RBIs from J.D. Martinez and a late home run by Marwin Gonzalez. Brad Peacock earned first major league win since 2011.
After losing 3-0 on Monday, the Astros scored 24 runs on 37 hits in winning the final two games of the series. The announced attendance of 10,493 for the finale was a record low for Safeco Field, which opened 13 1/2 years ago.
Carter, who hit two home runs in a 16-9 rout Tuesday, added three hits in this one. He finished the series 8 for 15 with three homers and five RBIs.
Houston, which arrived in Seattle with a .199 batting average, hit .367 in the series.
Peacock (1-1) allowed three runs and four hits in five-plus innings for his first big league victory since Sept. 22, 2011, with Washington at Philadelphia.
Kelly Shoppach had three hits for the Mariners, including a home run and an RBI double. Franklin Gutierrez hit his third homer in the sixth.
Seattle right fielder Michael Saunders sprained his right shoulder crashing into the outfield wall to make a catch in the first inning. He will be re-examined Thursday and the team said he is expected to miss "some time."
The Astros scored three times off Blake Beavan (0-1) in the second, highlighted by Ankiel's shot to center. Mariners pitchers have allowed 19 home runs, most in the majors.
Houston added two more runs in the third. Jason Castro reached on a two-base error when Gutierrez couldn't gather a popup in center that shortstop Brendan Ryan lost in the dusk. Castro scored on Pena's single, the first unearned run (out of 54) allowed by the Mariners this season.
Martinez doubled home Pena for a 5-0 lead.
Shoppach's first home run with the Mariners was a solo shot to left in the third. His second drive to left in the fifth required a video replay to confirm that it was a double. With Dustin Ackley on first, Shoppach hit a long shot to left-center. The ball ticked off the glove of a leaping Martinez and hit the yellow line at the top of the wall. Ackley raced around to score.
After Mariners manager Eric Wedge argued that it was a home run, crew chief Wally Bell gathered the umpires and they marched under the stands to check the replay. They ruled it a double and Shoppach was left stranded.
Gutierrez's leadoff shot in the sixth ended Peacock's night. He walked one and struck out three.
The Mariners have 14 home runs in their first 10 games. They hit just five through 10 games last season and didn't hit No. 14 until their 20th game.
Carter put it away in the seventh with his home run to left off Carter Capps.
NOTES: The Mariners called up LHP Bobby LaFromboise from Triple-A Tacoma and optioned LHP Lucas Luetge to their top farm team. Wedge said the move was necessary because of the strain on the pitching staff after Tuesday's loss. "It was nothing in regard to Lucas. He has options. He threw three innings (Tuesday) and we needed another arm," Wedge said. ... OF Casper Wells, beaten out for the final Mariners roster spot in spring training by Jason Bay, was claimed off waivers by Toronto. ... Michael Morse, tied for the big league lead with six home runs, was rested. ... Astros RHP Alex White, a candidate for the rotation until a March 29 arm injury, will undergo Tommy John surgery Thursday. ... Seahawks coach Pete Carroll was in attendance behind home plate.