The Dodgers won their fifth straight thanks to a dramatic appearance by Ramirez, who had been held out of the starting lineup after being hit on his left hand by a pitch during Tuesday's 12-3 win over the Reds.
With the score knotted at 2-2 in the sixth, the Dodgers loaded the bases on two walks and a single off Bronson Arroyo (10-9).
Nick Massett came on to relieve Arroyo and as Massett was throwing his warm-up pitches, Ramirez appeared in the Los Angeles dugout and grabbed a bat.
The sellout crowd began chanting, "Manny, Manny," and Ramirez came out to hit for starting pitcher Chad Billingsley.
Ramirez crushed the first pitch he saw from Massett over the wall in left for his 11th homer of the season and his fifth since returning from a 50-game suspension. The home run came on the same night the Dodgers gave away bobblehead dolls in Ramirez's likeness.
Billingsley (10-5) got the win by giving up two runs on seven hits in six innings.
The Reds lost their third straight.