Game 4 is Tuesday at Dodger Stadium, with Ricky Nolasco scheduled to start against St. Louis right-hander Lance Lynn.
"The playoffs are one-day momentum swings," Dodgers manager Don Mattingly said. "Right now I feel like we've kind of grabbed it."
Los Angeles got Ramirez and center fielder Andre Ethier back in the lineup after both proved in batting practice they were healthy enough to play. Ramirez wore a lightweight flak jacket to protect his broken left rib having been hit by a pitch from Joe Kelly in Game 1 while Ethier has been bothered by shin splints.
"What can I say? It couldn't be better," Ramirez said. "Really happy we got the first win. Just come back tomorrow and even up the series."
Ramirez singled his first time up off Wainwright and then helped the Dodgers extend their lead to 3-0 in the eighth.
Ramirez hit a soft single off Seth Maness over the head of second baseman Kolten Wong to score Carl Crawford. The speedy Crawford, on second base after a one-out single, rounded third and never stopped running when the throw from the outfield went to second base.
On a close play at the plate, Crawford barely beat the tag by catcher Yadier Molina.
"We just had a lot of balls in the air tonight that hit the ground that normally don't," Cardinals manager Mike Matheny said. "We're a better club than this."
During the rally, retired Dodgers manager Tom Lasorda, whose 1988 team won the franchise's last World Series title, stood up and waved his white rally towel to raucous applause.
Wainwright entered 4-0 with a 2.03 ERA and four saves in 15 career postseason games, including six starts. He pitched St. Louis past Pittsburgh in the division series, going the distance in a decisive Game 5 last Wednesday.
The right-hander tossed seven strong innings this time, allowing two runs and six hits with five strikeouts and no walks. Ryu, however, was even better.
The two were nearly even through the first three scoreless innings, with Wainwright giving up one hit. Ryu, who struggled in his first postseason start in the division series against Atlanta, retired 12 of his first 13 batters, yielding only a walk.
Ryu was much improved after lasting just three innings as the first South Korean pitcher to start a playoff game last week against the Braves. He allowed four runs on six hits for a no-decision in a game the Dodgers won.
The left-hander didn't permit a Cardinals runner past second base. David Freese's single to right leading off the fifth was their first hit of the game.
Freese was replaced by a pinch-runner because of tightness in his right calf. He is day to day.
Ryu struck out four and walked one.
"I was potentially thinking about that this could be the last game I pitch here this season," the rookie said through a translator. "I just zoned in."
Storylines Dodgers 3, Cardinals 0
R Los Angeles' Hyun-Jin Ryu holds St. Louis to three hits over seven innings to earn the win.
• Adrian Gonzalez hits an RBI double before Yasiel Puig hits a triple.