Tom Wilhelmsen (3-1) escaped a bases-loaded jam in the top of the ninth and Seattle began the bottom half with back-to-back singles off of Sergio Romo (2-1). Javier Lopez entered and allowed Smoak's one-out line drive to left field, which scored pinch-runner Munenori Kawasaki from second base.
"I tried to get a pitch to hit and not try to do too much," said Smoak. "I got a changeup right over the plate and put a good swing on it."
Felix Hernandez gave up one run over seven innings in his second start back from injury for the Mariners, who won the last two games of this series after suffering six straight losses.
Angel Pagan had an RBI single in the first for the Giants, losers of three of their last four games.
In addition to his game-winning hit, Smoak made a diving stop on Hector Sanchez's grounder to end the eighth after the Giants placed runners at first and second.
San Francisco threatened again an inning later, loading the bases with one down on a single and a pair of walks, but Wilhelmsen struck out Melky Cabrera on three pitches and grounded out pinch-hitter Nate Schierholtz to escape.
Cabrera fielded Smoak's base hit in the bottom half after Kyle Seger and Jesus Montero led off with consecutive singles. The left fielder's throw home was on target, but it struck a sliding Kawasaki in the back and rolled harmlessly up the first base line.
"The ninth inning was the difference," said Giants manager Bruce Bochy. "It was the golden opportunity but we didn't quite get it done and they got the big hit. Hits win games and we were missing that today, especially in the ninth."
Hernandez missed 11 games with lower back stiffness...The Giants dropped their first road series since losing two of three games to the Dodgers from May 7-9...Home plate umpire Andy Fletcher left in the eighth inning after taking a pitch off of his arm. He was replaced by Joe West.
For more on the Giants head over to McCovey Chronicles.