Gorkys Hernandez reached first on a routine grounder to start the top of the 10th that went as an infield hit, and he eventually came around to score on a Giancarlo Stanton two-out RBI single off Sam Demel for the game-winning run.
"I didn't have great at-bats all game," Stanton said. "I knew he wasn't going to just serve a strike up there. I was thinking he was pretty much going to throw offspeed. Even if you don't hit the ball on the barrel, put the ball in play and something good might happen."
The D-backs stranded 10 runners, including five in the final three innings.
With the loss, the club moved to 9-18 in one-run games this season. Last year, the team was 28-16 in one-run contests, the best record in baseball.
"We had our opportunities," Gibson said. "We left guys out there. We couldn't put them away when we should've. It's disappointing."
D-backs starter Trevor Cahill failed to take advantage of the early support, lasting just 5 1/3 innings, allowing four earned runs on seven hits and taking a no-decision. The 24-year-old hasn't won since defeating the Dodgers on July 30.
"It seems like I was pitching in and out of trouble all night; a guy got on in just about every inning, it makes it tough," Cahill said. "It's a credit to them, to have a rough inning like that, bounce back and put up zeroes the rest of the game. That's huge for them. Unfortunately, I couldn't hold the lead."
The D-backs didn't waste any time manufacturing runs. In fact, they scored five in their first at-bat before recording an out.
For just the fourth time in franchise history, the D-backs' first six batters reached base, resulting in RBIs for Aaron Hill, Justin Upton, Miguel Montero and Ryan Wheeler off Marlins starter Ricky Nolasco.
Upton, who drove in two runs and later scored, left the game shortly thereafter with a tight left hamstring.
"It's always tough to watch when you get a cushion early and we're not able to hold it," Upton said. "That's a tough loss."
Cahill allowed the Marlins to inch closer in the second inning, when RBI hits from Donovan Solano and Nolasco cut the lead to 5-2.
The right-hander again found himself in trouble two frames later, putting two runners in scoring position with just one out, but Cahill managed to sneak out of the threat unscathed as the Marlins squandered the opportunity with a shallow popup and a groundout to short.
The D-backs weren't so fortunate in the sixth inning, however. After Solano singled home Stanton with one out in the frame, D-backs manager Kirk Gibson went to the bullpen to replace Cahill with Matt Albers, who promptly served up two more RBI singles to leave the game tied at 5.
"Early in the year, we would have just gave up and lost 10-0 or 5-0 or whatever, but we fought," Stanton said. "Everyone contributed tonight."
The earned run credited to Albers marked the first time he's allowed one in eight appearances with the D-backs since being acquired from Boston at the non-waiver Trade Deadline.