Ryu (3-1) struck out three and walked one on a season-high 112 pitches in seven innings, helping his club move into a tie with the Giants atop the NL West at 10-6.
Yasiel Puig returned to the Dodgers starting lineup and went 1 for 4 with a strikeout. He dropped a routine fly ball in right early on but recovered to throw out Brandon Belt at second. He then made a nice over-the-head catch on the next batter and a running grab in shallow center in the eighth with a runner on second.
The Cuban star said before the game he will stay focused on baseball despite reports smugglers who got him out of his country threatened his life. He made two baserunning blunders in the season-opening series at Australia, then arrived late at Dodger Stadium for the home opener and was scratched.
Tim Federowicz hit an RBI single in the second to put the Dodgers ahead, and Adrian Gonzalez singled in a run in the fifth to chase Madison Bumgarner.
Gonzalez extended his hitting streak to 12 games, adding an eighth-inning double.
Former Giants closer Brian Wilson gave up a leadoff double to Ehire Adrianza but escaped the inning unscathed. Kenley Jansen gave up a two-out RBI single to Adrianza before finishing for his fifth save.
Ryu had surrendered a career-high eight runs in a career-short two innings against the Giants in the Dodgers' home opener April 4.
With his bushy beard freshly shorn, Bumgarner (2-1) had a three-start winning streak against the Dodgers snapped with just his second loss in the past seven outings against Los Angeles. The left-hander allowed two runs, six hits and three walks with six strikeouts in 4 1-3 innings but threw 99 pitches.
Los Angeles played without shortstop Hanley Ramirez, a day after he was hit by a pitch on the top of his left hand. The Dodgers said there is no fracture, and Ramirez said he had iced the hand eight times and planned to play Friday against Arizona to begin a 10-game homestand.
NOTES: LHP Clayton Kershaw, on the DL with a strained muscle in his back, threw breaking balls off the mound and added velocity from his previous session. A rehab assignment is yet to be scheduled, nor any further tests at this time, manager Don Mattingly said. Kershaw will continue to throw every other day. ... Giants SS Brandon Crawford was given an extra day off to rest his tender right hamstring. He was available to play and took ground balls before the game. ... CF Angel Pagan didn't start because of knee soreness but appeared as a pinch-hitter. "He banged his knee into a wall a few days ago, so we're giving him a break," Giants manager Bruce Bochy said. ... The Dodgers improved to 11-2 when they score first.