The Giants came back in support of Matt Cain to tie the game late, but Detroit plated two in the seventh to snap San Francisco winning streak.
Brandon Crawford homered in the seventh inning to tie the game at 3-3.
George Kontos gave up a two-run single in the eighth with the bases loaded that put the Tigers ahead 5-3. Both runs were charged to Matt Cain -- who pitched 6 1/3 innings.
Hunter Pence hit his sixth home run of the season.