Four relievers did not allow a hit over the final three innings to finish the one-hitter.
Cardinals starter Adam Wainwright missed a chance to match Colorado Rockies ace Ubaldo Jimenez as the majors' lone 15-game winners, striking out six and scattering six hits in six scoreless innings. Wainwright has worked 25 consecutive scoreless innings his last four starts and lowered his ERA to 1.94.
Brad Lidge finished for his eighth save in 11 chances as the Phillies won for just the second time in eight games since the All-Star break, outhitting St. Louis 12-1 but going 1 for 10 with runners in scoring position.
The Cardinals went 7-1 on their first homestand after the break and outscored opponents 46-17 during their longest winning streak since 2004. Still, they haven't swept the Phillies in a four-game series at home since 1986.
Polanco hit his sixth homer and first since May 9 on a 1-1 pitch from Kyle McClellan (1-3), who hadn't allowed a run at home in 20 games covering 25 innings. It was the third hit for Polanco, whose 12-game hitting streak ended Wednesday.
Polanco has batted leadoff the last two games, with slumping Jimmy Rollins moving to sixth in the Phillies' order. Rollins was 1 for 4 for the second straight day.
Jayson Werth added an RBI double off Fernando Salas.
Chad Durbin (2-1) struck out Albert Pujols and got Holliday on a tapper to end the 10th.
Aaron Miles, Colby Rasmus, Pujols, Holliday and Allen Craig all went down swinging against Hamels before Molina bounced out to third to end the second.