Greinke (9-5) allowed a pair of runs in the second inning, but held the Cardinals right there until running into trouble in the seventh. It was the right-hander's fourth straight winning start, and he has allowed a total of five runs over that span.
"He's on a great roll right now," Lovullo said. "Pitched into the seventh inning, did everything we asked. I thought he had great command of his fastball. It was downhill and it seemed like he could spot it up. I feel like today he had his best slider of the year. He went to that pitch often, got a lot of swings and poor contact on that pitch."
Greinke agreed with his manager's assessment of his slider.
"It was good," he said. "The one pitch they hit a little bit was the changeup."
Goldschmidt, meanwhile, continued to move past a rough month of May, when he hit .144, as the NL Player of the Month for June followed Monday's 4-for-4 performace with a game-changing homer.
It's no coincidence that in May the D-backs were 8-19, but were 19-9 in June.
On Tuesday, Goldschmidt struck out swinging in his first two at-bats against St. Louis starter Jack Flaherty.
In his third at-bat, there were runners at second and third and two outs with the Cardinals leading, 2-1.
Goldschmidt fell behind 0-2 before fouling off a fastball and then taking back-to-back sliders in the dirt.
"I was trying to put something in play and fouled off a fastball barely and laid off a couple of sliders and then just really trying to put something in play, a hit anywhere, an infield single could tie the game," Goldschmidt said.
Flaherty came back with another slider, this one on the outside corner, and Goldschmidt drilled it over the wall in right to give the D-backs a 4-2 lead.
"Knowing how good his stuff is, it was kind of, 'Hey I need to shorten up a little bit after he got me the first couple of times,'" Goldschmidt said. "Doesn't always work out that way. It's nice when it does, but, yeah, just wanted to put something in play there."
With the win the D-backs remained 1 1/2 games ahead of the second-place Dodgers, who beat the Pirates, 8-3, on Tuesday.
MOMENTS THAT MATTERED Hirano leaves 'em loaded: After the Cardinals put runners on first and second against Greinke with two outs in the seventh, Lovullo went to lefty Jorge De La Rosa to face Matt Carpenter. De La Rosa walked Carpenter to load the bases for Tommy Pham and Lovullo brought in right-hander Yoshihisa Hirano, who got Pham to ground into a fielder's choice to end the threat.
"Can't really do any better than he's done this year," Greinke said of Hirano, who has inherited 16 runners and stranded 15 of them. "That was a tough one today, tough jam to get out of, and he did as good as he could. Jake made a really good play. It may have looked easy, but I don't think it was that easy."
MITEL REPLAY OF THE DAY With Goldschmidt at first and one out in the eighth, Jake Lamb lifted a deep fly to left field that hit off a fan's glove and bounced back onto the field of play. Umpires initially ruled it was a two-run homer, but after a crew-chief review, it was determined the fan had reached over the wall to deflect the ball.
So instead of a home run, it was ruled a double because of fan interference and Goldschmidt was placed at third base. It proved to be costly. After an intentional walk to A.J. Pollock to load the bases, David Peralta grounded into an inning-ending double play.
UP NEXT The D-backs celebrate the Fourth of July with a 7:10 p.m. MST start against the Cardinals at Chase Field. The game, which is sold out, will feature Arizona lefty Patrick Corbin (6-3, 3.14 ERA) against St. Louis right-hander Miles Mikolas (8-3, 2.61 ERA). Corbin has allowed just one earned run in his last two starts spanning 13 innings.