The disgruntled slugger was 2-for-4 Friday night, one day after being part of a three-way trade that sent him from Boston to Los Angeles.
And in the bottom of the ninth, with the Dodgers down a run, he came up with a runner on and no outs against Brandon Lyon.
The closer got him to hit into a double play and the Diamondbacks hung on for a 2-1 victory.
"That's a storybook ending right there -- Manny getting traded here and coming up (representing) the winning run," winning pitcher Randy Johnson said after his first-place Diamondbacks opened a three-game lead over the Dodgers in the NL West. "But Brandon made some quality pitches and got the double play. He's done his job pretty well all year."
After giving up a leadoff single to Russell Martin, Lyon went 2-2 on Ramirez before throwing him a fastball away. The 12-time All-Star hit a grounder to shortstop Stephen Drew for the rally-killer and Jeff Kent popped out to second, giving Lyon his 24th save in 29 attempts.
"I think I was trying to do too much," said Ramirez, who came in 2-for-3 lifetime against Lyon with a home run. "I was just trying to see the ball and hit it. He made a good pitch and got me out, but tomorrow's another day."
Johnson (9-7) won his fifth straight start and climbed within seven wins of 300, allowing an unearned run and five hits over six innings. The five-time Cy Young winner ran his career record at Dodger Stadium to 7-0, striking out six and increasing his career total to 4,723 -- second all-time behind Nolan Ryan.
"My mechanics have fallen into place over the last three or four games and I'm able to throw all of my pitches over for strikes now and stay away from the big inning," Johnson said. "Throwing first-pitch strikes, I had some easy innings and it allowed me to stay out there."
The Big Unit was lifted for a pinch-hitter in the seventh, when the Diamondbacks pulled ahead with two runs against reliever Chan Ho Park (4-3).
Tony Clark tied it 1-1 with a leadoff homer to center. Chris Snyder singled and advanced on Chris Burke's sacrifice bunt before Chad Tracy batted for Johnson and walked. Drew followed with an RBI double than landed just inside the right field line.
Dodgers rookie Clayton Kershaw allowed four hits over six scoreless innings. The 20-year-old left-hander was lifted for a pinch-hitter in the sixth, when Los Angeles capitalized on a throwing error by second baseman Orlando Hudson to take a 1-0 lead.
"He's got great stuff. I mean, you can see why they're pretty excited about him," Arizona manager Bob Melvin said of Kershaw. "I think he was throwing a little harder than the gun would suggest. He had a real good curveball and it seemed like he could throw it all counts. He's definitely something to be excited about."
Juan Pierre, batting for Kershaw, reached on Hudson's ninth error. Pierre stole his 37th base after Johnson had him picked off first and Clark threw the ball into left field. Matt Kemp drove in the run with a double to left, extending his career-best hitting streak to 19 games. But he strayed too far past third on Ramirez's infield single to first and was tagged out in a rundown to end the inning.
"Manny's obviously a big bat in their lineup, and hopefully he pays dividends for them -- after we leave," Johnson said. "Everybody can be pitched to, but he's one person that can change a lineup and make hitters around him better. If you make a bad pitch, which I have against him at times, he's going to do what he does best. So to give him two singles today, including an infield hit, I'm pretty happy with that."
Ramirez helped Boston win two World Series titles in four years after an 86-year drought.
The Dodgers last won the World Series in 1988, and in a desperate attempt to end that dry spell, they acquired the 36-year-old Ramirez on Thursday in a three-team deal with Pittsburgh.
Once Ramirez got settled in with his new teammates, including former Red Sox Derek Lowe and Nomar Garciaparra, he met with manager Joe Torre and donned his white Dodger uniform -- shunning the trademark baggy pants in favor of a slightly more streamlined look.
Ramirez was assigned a locker in the narrow and antiquated Dodgers clubhouse between Jason Johnson and Mark Sweeney. He was given No. 99 instead of his familiar No. 24, which the Dodgers retired to honor Hall of Fame manager Walter Alston. Ramirez's second choice was 34 -- ex-teammate David Ortiz' number -- but clubhouse manager Mitch Poole has unofficially kept that number out of circulation out of respect for Fernando Valenzuela.
Before Ramirez's first at-bat he was welcomed with a montage of highlight footage from his days with Cleveland and the Red Sox. The sellout crowd of 55,239 chanted his first name in unison and flashes went off around the ballpark while he looked toward the upper deck behind home plate and surveyed his new surroundings.
- When the Red Sox played their only interleague series at Dodger Stadium in June 2002, Ramirez was on the disabled list with a broken left index finger.
- Ramirez's first curtain call as a Dodger came 15 minutes before the first pitch, when a ground-level TV camera showed him sitting in the dugout and the crowd roared its approval. He stepped out of the dugout and doffed his cap, bringing more cheers.
- Johnson is the only pitcher with at least 2,000 strikeouts for two teams. Ramirez is one of four players with 200 or more homers for two clubs.