The NL West leaders were the last team in the majors to lose three straight and they were one strike from ending that skid in regulation.
"This was just a tough game," Dodgers manager Joe Torre said. "But it was a remarkable game on both sides."
Both teams had several chances in extra innings in a game that lasted 4 hours, 53 minutes and included 453 pitches.
"By my count, there were about three different games," Cardinals manager Tony La Russa said. "Heroics all over the ballpark on both sides."
Kershaw allowed four hits and struck out seven in eight scoreless innings, a career high. He is 5-0 with an 0.79 ERA in his last nine starts, and lowered his ERA to 2.76.
Blake Hawksworth (1-0) allowed two hits and struck out three with an intentional walk in three innings for his first career victory.
"It was huge the way we battled back," Pujols said. "In a game like this, you have to make a lot of great plays."
The Cardinals are 11-2 against the Dodgers at 4-year-old Busch Stadium, and 17-3 at home against Los Angeles since 2004. The Dodgers stranded a season-high 15 runners.
The four-game skid is the Dodgers' worst since they dropped eight straight from Aug. 22-29, 2008, and they have totaled three runs and 33 hits the first three games of a four-game series.
Manny Ramirez's spectacular leaping catch at the left-field wall prevented a go-ahead extra-base hit by Ryan to end the seventh.
The Cardinals had runners on first and second in the seventh when Ramirez pulled down Ryan's drive, took a few steps back from the wall and tossed the ball into the stands. A fan tossed it back so quickly that many in the sellout crowd believed it was a home run, and Ryan had a puzzled look as he stood on second base as the Dodgers trotted off the field.
"My heart dropped into my stomach when I saw him throw the ball back into the stands," Ryan said. "I felt nauseous."
Cardinals starter Joel Pineiro gave up one run and six hits in eight innings, lowering his ERA to 2.84.
"It was a fun game to be part of," Pineiro said.
The Cardinals were down to their last strike before Colby Rasmus' broken-bat, opposite-field RBI single in the ninth off Jonathan Broxton. It ended Broxton's run of 12 consecutive saves, although Rasmus was caught stealing to force extra innings.
"I'll take 1-0 going into the ninth with Broxton as our closer," Kershaw said. "I'll take those chances you know 100 percent of the time."
Both teams scored in the 11th, the Dodgers getting to All-Star closer Ryan Franklin with two hits and a sacrifice fly by Kemp and the Cardinals answering on Ryan Ludwick's one-out RBI single off Ramon Troncoso before stranding two runners.
Ludwick's strong throw from right field nipped Ramirez at the plate trying to score on Casey Blake's two-out single to end the 12th.
Ludwick, who got his first start of the year in center field instead of his usual spot in right, mistimed a diving attempt on Blake's sinking liner to help the Dodgers take the lead. Blake ended with a triple on a ball that went to the wall and James Loney, who had four hits, followed with an opposite-field single for his team-leading 63rd RBI, one more than Andre Ethier.
Pinch-hitter Joe Thurston's one-out double in the 12th was wiped out on appeal because he missed first base. It's at least the second time the Dodgers have won such an appeal play, also negating the go-ahead run in a 3-2 victory over the Mets on May 18 because Ryan Church missed third base. ... Pujols doubled leading off the seventh for only his third extra-base hit since the All-Star break. ... Franklin has allowed three runs and seven hits in three innings since the break.