According to the Elias Sports Bureau, the last time the D-backs scored two runs on a wild pitch was in 1998, the franchise's inaugural season.
"It wasn't pretty, but we're into winning ballgames and we did that tonight," D-backs manager Kirk Gibson said.
D-backs starter Wade Miley came away with a well-deserved win. The left-hander battled through a dead arm midway through March and there was some doubt up until last weekend whether he would be ready to start Friday.
Miley erased any doubts early as his velocity touched 93 mph and rested comfortably around 91-92.
"I felt good, the ball's coming out kind of live," Miley said. "I just wanted to go out and compete and give the team a chance to win."
In allowing just one run -- a homer by Jean Segura in the fourth -- Miley put the D-backs in a good position, but Brewers starter Kyle Lohse matched him through six before both starters departed.
Goldschmidt started the winning rally by drawing a walk off reliever Burke Badenhop and Kubel followed with a single. A.J. Pollock sacrificed the pair up a base and the Brewers brought in Gonzalez to face Cliff Pennington.
Gonzalez walked Pennington on four pitches and after pinch-hitter Alfredo Marte struck out, Gonzalez uncorked a wild pitch that hit home plate umpire Chris Conroy's mask and bounced all the way to the front of the Milwaukee dugout.
Goldschmidt scored easily from third and as the Brewers reacted slowly to the ball, Kubel never stopped running as he rounded third and scored easily with Pennington moving all the way from first to third.
"Goldy took off, nobody was really going for the ball so I just kept going," Kubel said. "I thought even Penny might have even had a shot [at scoring], I mean nobody was going for it, it was weird. Good thing for us, it worked out."
Gonzalez's fastball sailed right over the glove of catcher Jonathan Lucroy, who was apparently expecting a breaking ball, and right off Conroy's mask.
"It was both of us," Gonzalez said. "I can't put too much thought into it. I'm going to get through this and get into a rhythm. It's going to get better."
The D-backs got an early break when Brewers slugger Ryan Braun was scratched from the lineup just prior to the game with neck spasms.
"It always helps getting Braun on the bench because he's a good hitter," Miley said. "He's a great player, but even with him out you've got the same plan, you're still going to go after guys and just try to lock in and compete."
Miley scattered five hits and walked one while striking out eight.
"Wade was very sharp tonight," Gibson said. "He threw the ball well. You saw the velocity and the direction of where he wanted to put the ball was very good."
Kubel helped Miley out with his arm in the fourth.
After Segura's homer tied the game at 1, Rickie Weeks and Aramis Ramirez collected back-to-back singles. Weeks stopped at third on Ramirez's single to left, but Ramirez decided to test Kubel's arm by heading to second.
Kubel, who led the National League with 14 outfield assists last year, threw a strike to second and Ramirez was tagged out and sprained his left knee on the slide.
"I kind of looked in because I wasn't watching the runners I was trying to see where the ball was going to go, so I didn't really know who was where," Kubel said. "I looked in and saw Penny pointing to second, so I just kind of [made a] blind throw over to second but it was right there."
Brad Ziegler pitched into and out of a jam in the seventh before David Hernandez and J.J. Putz closed things out for the D-backs in the eighth and ninth.
"We were terrible with guys in scoring position," said Gibson, whose team was 1-for-10 in those situations. "But we won the game. We didn't make any mistakes on the other side of the ball. We made good pitches when we had to make good pitches. We had a couple of double plays. Kubel cut down Ramirez. That's what you've got to do."