"The toughest way to beat that club is to score runs late," manager Tony La Russa said. "Kind of magical there."
Adrian Gonzalez hit his 32nd homer and singled three times for the Padres, who have lost five straight and have dropped nine in a row in St. Louis. Bell (4-2) blew only his second save in 31 chances and first since May 30 against the Rockies, retiring only one batter.
"The last time I was here it was fun, exciting, and it didn't mean anything," Bell said. "Today it meant something and I'm really ticked off.
"I wasn't thinking of the All-Star Game one bit, I was just out there trying to get San Diego another victory."
Bell took a ground ball off his right leg earlier in the inning on a comebacker by Mark DeRosa but wouldn't use that as an excuse.
"Yeah, it was throbbing but I blocked it out pretty good," Bell said. "I was surprised how big it was when I took my pants off."
Trever Miller (4-0) had a strikeout in a scoreless ninth for the NL Central leaders, who have won eight of nine and are a season-best 15 games above .500 with a five-game lead over the Cubs.
Rasmus hit his 12th homer on an 0-1 curveball from Bell, who gave up a game-tying single to Yadier Molina the previous at-bat. It's the second walk-off homer for the rookie, who also beat the Giants July 1 at home, and also his first homer since July 7.
Rasmus is the first St. Louis rookie to hit two game-winning homers since Bill Virdon in 1955.
The sudden finish followed two rain delays totaling 2 hours and 19 minutes after being in jeopardy earlier in the day due to an overnight power shortage. Power was restored about three hours before game time.
"It doesn't get much better than that, especially with the long day," Rasmus said. "Glad to a part of it."
Gonzalez is batting .568 (21 for 37) during an eight-game hitting streak and .460 overall in August. He homered twice in the series and leads the majors with 22 homers on the road.
Albert Pujols lined an RBI single off the center field wall in the third, although he was an easy out at second when the ball caromed right to Tony Gwynn Jr., and is batting .488 (19 for 43) during an 11-game hitting streak. Molina added an RBI double and three walks to wind up an 9 for 20 homestand, a night after picking off his seventh runner of the season.
Luis Rodriguez had an RBI single and pinch hitter Oscar Salazar followed with a sacrifice fly in a two-run sixth off Lohse that put the Padres ahead 6-5. Lohse, who ended a four-game losing streak since coming off the DL from a forearm injury in his last outing, allowed five runs in 5 1/3 innings.
"I felt great the first four innings," Lohse said. "The sixth inning, the slider was terrible. It's the pitch I depended on early in the game."
The first two Padres pitchers were struck by batted balls. Starter Clayton Richard absorbed Matt Holliday's shot up the middle in the third, recovering to make the throw to first to end the inning. Edward Mujica also turned personal pain into an out after absorbing Albert Pujols' shot off the right knee with the bases loaded to end the fourth.
Mujica tried to run off the field before collapsing near the third base line, although he eventually limped to the dugout. A team spokesman said Mujica had a bruise on the back of the knee.
Pujols' strong throw from first base prevented the Padres from going ahead in the fifth, barely beating Everth Cabrera running from third on Gonzalez' tapper.
Richard issued a season-high six walks in 3 2/3 innings, including Julio Lugo on five pitches with the bases loaded in the fourth, allowing the Cardinals to tie it at 3. Richard walked three and gave up an RBI single to Lohse in the fourth.
- Both starters had an RBI, Richard on a sacrifice fly in the fourth and Lohse on a single in the fourth.
- Pujols has nine seasons with a .300 average, 30 homers, 30 doubles and 100 RBI, tied with Lou Gehrig for the best in history.