It all added up to a one-sided win against the Colorado Rockies.
Posey hit a two-run homer, and Cain tossed seven solid innings in the Giants' 9-3 victory against the Rockies on Saturday.
"We know what our offense is capable of doing," Posey said. "We were coming off a good road trip, and it was nice to see us do the same at home."
Cain (11-5) gave up two runs and seven hits in 7 1/3 innings, and added an RBI single to win for the first time since July 15. He walked one and struck out six. Angel Pagan hit a two-run triple, and Marco Scutaro, Hunter Pence and Joaquin Arias also drove in runs for the Giants.
"I felt like I was able to make better quality pitches this start," Cain said. "My direction was better and I was able to pitch to the outer parts of the plate."
D.J. LeMahieu hit his first major-league home run for the Rockies, who had won three of four.
"The wind was blowing out a little bit and that kind of helped it," LeMahieu said. "But to hit it off Matt Cain and here in San Francisco, it was pretty special."
Drew Pomeranz (1-7) gave up four runs and five hits over four innings to fall to 0-4 in his past six starts. He struck out three and didn't walk a batter.
"We had to come from too far back against a very good pitching staff," Rockies manager Jim Tracy said. "You can't beat this team that way. You simply can't do it."
Posey's 19th home run of the season, a two-run shot in the third that landed in the first row of the left field bleachers, gave the Giants a 4-0 lead. It was Posey's ninth homer since the All-Star break, tying him with San Diego's Chase Headley for the second most in the National League.
"I'm comfortable hitting here and see the ball well," Posey said. "The park is big but all the gaps are big, too."
Cain carried a shutout into the sixth inning, when the Rockies loaded the bases with no outs. He pitched his way out of it, allowing one run on Rutledge's infield groundout.
LeMahieu hit Cain's first pitch of the eighth inning, and Eric Young and Rutledge singled one out later to end Cain's day.
Pagan and Arias tripled, giving the Giants 38 on the season, two shy of the Rockies' major league-leading total. There have been 27 triples hit in AT&T Park.
Rockies RHP Will Harris was recalled from Colorado Springs. RHP Edgmer Escalona was placed on the DL with inflammation in his right arm. IF Todd Helton was transferred to the 60-day disabled list. ... RHP Alex White (2-6, 5-.75) pitches for the Rockies on Sunday. He is 0-2 with a 8.38 ERA in two previous starts against the Giants. ... Rockies C Ramon Hernandez has eight hits in his last six starts. ... Rockies OF Dexter Fowler didn't play due to back spasms. ... Giants IF Pablo Sandoval (left hamstring) was 0 for 2 in his first rehab start Friday night in San Jose. ... LHP Barry Zito (9-8, 4.19) starts for the Giants on Sunday. He is 6-2 with an ERA of 2.93 in 18 appearances, 17 starts, against the Rockies. ... Cain is 10-0 when given at least three runs of support this year. ... The Giants have won twice in 10 home games.