Cain (2-2) allowed three hits and added an RBI single during a six-run rally in the fourth inning.
Hudson (4-2) was cruising until the fourth when the Giants batted around and scored six runs. Marco Scutaro had two hits, including a two-run single during the inning.
The Braves’ veteran right-hander had been 6-0 with a 2.48 ERA against San Francisco since losing to them on April 8, 2006.
Buster Posey had an RBI double, Hunter Pence a run-scoring infield single and Brandon Belt an RBI double during the big inning. Brandon Crawford was intentionally walked with one out to load the bases for Cain, who stepped to the plate 0 for 11 on the season.
He grounded a single through the right side to make it 4-0, and Scutaro capped the rally with a two-run single to left to drive Hudson from the game.
The six runs and seven hits were the most the Giants have collected in any single inning this season. It was Hudson's shortest outing of the season as he only went 3 2/3 innings.
Brian McCann had a two-run homer in the fifth inning for the only blemish against Cain. It marked the 26th time an opponent knocked one into McCovey Cove on the fly, and it was the 88th “splash hit” overall since the park opened in 2000.
Cain delivered his best start of the season despite taking a liner off his hip from the bat of McCann in the second. He recovered and chased the ball down by the first-base line and got the out.
NOTES: Struggling Giants right-hander Ryan Vogelsong will make his next start as scheduled Wednesday at Toronto, manager Bruce Bochy said. There was speculation that Vogelsong, 1-3 with a 7.78 ERA, might be skipped for a turn. ... Carlos Tosca served as the Braves’ interim manager Friday in place of Fredi Gonzalez and will do so again today, with Gonzalez in Georgia to attend his daughter Gigi's graduation from Georgia Southern University. Gigi Gonzalez is a graduate of Lassiter High School in east Cobb. ... Right fielder Jason Heyward did not play Friday for Triple-A Gwinnett, one day after beginning a rehab assignment following his emergency appendectomy April 22. GM Frank Wren said Heyward was experiencing “normal soreness” after the long layoff. ... Left-hander Paul Maholm, who starts today, is 2-2 with a 3.43 ERA in nine career starts against the Giants.