Chad Billingsley worked six solid innings for Los Angeles and three relievers combined to finish the three-hitter. Jonathan Broxton struck out two during a scoreless ninth, earning his second save.
Ramirez's big hit in the seventh came after an unusual mixup with the Padres. Cla Meredith thought he had been summoned from the bullpen to face the dreadlocked slugger after Edward Mujica (0-1) had given up back-to-back singles to Rafael Furcal and Orlando Hudson with one out.
Meredith got close to second base before manager Bud Black, who had come out to the mound to talk to Mujica, waved him back to the bullpen.
Mujica threw a called strike past Ramirez, who drove the next pitch into right-center to put Los Angeles ahead 4-2. James Loney tacked on an RBI single off Meredith later in the inning.
Ramirez also drove in a run with a first-inning groundout and Casey Blake homered for the Dodgers.
San Diego's Walter Silva pitched five effective innings in his major league debut. The 32-year-old right-hander allowed two runs and five hits, walked four and struck out one.
Billingsley (1-0) entered the fifth seemingly in control with a 2-0 lead. He had allowed just two singles and thrown 65 pitches, 43 for strikes. He then experienced a bit of wildness, walking the first three batters he faced to load the bases with none out in the inning.
Jody Gerut drove in a run with a fielder's choice and David Eckstein had a sacrifice fly, but Gerut was doubled up 8-3-4 attempting to go to second on Eckstein's ball.
Notes:@ Rookie shortstop Everth Cabrera made his major league debut for the Padres. He got his first hit with a two-out double in the seventh. He also scored his first run in the fifth after walking. ... Tom Garfinkel was introduced as the Padres' new president and chief operating officer. Los Angeles' Jason Schmidt (shoulder) pitched five innings in an extended spring training game. Manager Joe Torre said he would remain in extended spring training until he's ready for a minor league rehab assignment.