Cain went seven innings, allowing only one earned run as the Giants won 2-1 in Kansas City in 11 innings.
It was the first time the Giants had played at Kaufmann Stadium since the 2014 World Series.
With Bumgarner set to pitch on Wednesday, the Royals may be glad the Giants are only in town for two days.
Cain, who was injured, did not pitch in the 2014 World Series.
It was the second straight great outing for Cain who allowed a run over five innings against the Arizona Diamondbacks.
It was also the first time Cain had gone seven or more innings and allowed two or fewer runs since May 10, 2016 against the Toronto Blue Jays.