Cliff Pennington went 3-for-3 with two RBIs for Arizona and Didi Gregorius, competing for Arizona's starting shortstop job, went 3-for-4 with a run and an RBI.
Greinke, making his first start since suffering a mild right calf strain Feb. 27, allowed six hits in two innings with two strikeouts..
"My calf felt pretty good," said Greinke. "It got better as the day went on. That's a positive."
Arizona starter Michael Lee allowed two runs in three innings. Cesar Carrillo followed Lee with three scoreless innings.
The Dodgers scored twice in the first inning on a double by Hanley Ramirez, a walk by Adrian Gonzalez and a two-run double by Andre Ethier.
Arizona's second-inning rally started with Marte's homer, followed by singles from Duncan and Henry Blanco. Lee moved the runners over with a fake bunt groundout. Duncan scored on Tony Campana's single and Blanco on Pennington's sacrifice fly.
Up next: Paul Maholm will start for the Dodgers on Thursday against Cincinnati in a game that can be seen on MLB.TV at 1:05 p.m. PT. Maholm is coming off an impressive three-inning outing, followed by an equally impressive bullpen session. The Dodgers could send out essentially their regular-season lineup. Tim Wallach will again manage in the absence of Don Mattingly, who is expected back in camp Friday after a death in the family.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.