PHOENIX -- Even Hanley Ramirez is captivated by the roll the Los Angeles Dodgers are on, one that kept going Wednesday.
Ramirez's home run to lead off the 14th inning broke a tie and A.J. Ellis followed with another for a 7-5 victory over Arizona, the Dodgers' 15th victory in their last 18 games.
"What's happening right now to us is incredible," Ramirez said. "Everybody wants to be part of it right now."
Ramirez had three hits, drove in three runs and was a triple short of the cycle, a day after his career-high 19-game hitting streak was broken. He is hitting .409 in 35 games and is hitting .464 since beginning his streak June 19.
"My teammates and everybody here give me that confidence. I really appreciate that," Ramirez said. "When you have that confidence, everything comes easy."
He hit the first pitch from Josh Collmenter (4-2) for his eighth homer of the season, and Ellis hit his fourth homer five pitches later.
"Everybody contributes, not just one guy. It's everybody," Ramirez said.
Kenley Jansen (3-3) gave up a leadoff single to Paul Goldschmidt in the last of the 13th inning but did not allow another hit in his two innings.
The Dodgers (46-46) have won four straight and reached .500 for the first time since April 30. They have gained seven games on NL West-leading Arizona (47-44) since the teams last met June 12.
Los Angeles tied the game off Heath Bell in the ninth inning. Adrian Gonzalez walked on a 3-2 pitch with two outs before Ramirez and Ellis singled, scoring pinch-runner Jerry Hairston Jr.
"I've faced Adrian a lot. He knows me. I know him," Bell said. "A pitch got away from me, and I ended up walking him. I thought I could let Hanley out, but it didn't happen that way. I feel really bad because I let everybody down. We definitely should have won that game."
Bell has five of the D-backs' major-league-high 19 blown saves.
"That's unacceptable," Arizona manager Kirk Gibson said of the walk to Gonzalez. "We have to figure out some things so that we can get outs late in the game. It's a shame."
Ellis also had three of the Dodgers' 15 hits, and Gonzalez had two.
Goldschmidt doubled in two runs in the fifth inning (he leads the NL with 76 RBIs) and Martin Prado drove in Goldschmidt to cap the three-run inning for a 5-3 lead off Los Angeles starter Hyun-Jin Ryu. That was Arizona's last hit until the 12th inning.
Aaron Hill had two hits, including his fourth homer, and scored twice. A.J. Pollock had three hits and scored twice. Hill's sacrifice fly gave Arizona a 2-0 lead in the third inning.
Ramirez's double pushed the Dodgers ahead 3-2 in the fifth before the D-backs rallied.
Gonzalez hit his 14th home run, a bases-empty shot leading off in the seventh inning, to make it 5-4.
"We don't panic," Ramirez said. "When we are down a couple of runs, we know we can come back and win the game."
NOTES: Dodgers INF/OF Skip Schumaker lost the appeal of his two-game suspension for his part in the June 11 brawl between the Dodgers and the Diamondbacks. He began serving it Wednesday. Schumaker was cited for "aggressive actions." He also will miss the opener of the Dodgers' home series against Colorado that begins Thursday. ... Dodgers RHP Josh Beckett underwent surgery to treat his thoracic outlet syndrome in Dallas on Wednesday. The procedure, performed by Dr. Greg Pearl, included the removal of Beckett's first right rib to alleviate pressure on his nerves. ... With Hill's first-inning homer, the D-backs have an extra-base hit in 75 straight games, the longest streak in the majors this season. ... Arizona LF Cody Ross took a home run away from Dodgers 2B Mark Ellis with a leaping catch at the left field fence in the first inning, and CF Pollock took at least a double away from Ellis in the third with a diving catch in left-center.