Entering the contest the D-backs had lost the past two days to Los Angeles and six of seven on the season, with Webb recording the only victory.
With the win, Arizona moved into a first-place tie with San Diego in the National League West, a half-game ahead of the Dodgers.
Webb (8-5) allowed seven hits and a season-high five walks while throwing 115 pitches to outduel Derek Lowe (8-7), who gave up two runs (one earned) on five hits in 6 2/3 innings.
"No room for error, and probably wasn't the best command of his fastball today at times, was rushing just a little bit, but he just kept after it," manager Bob Melvin said. "Mixed in his breaking ball just enough, found his sinker again at times, would lose it a little bit at times. That's just a gutsy performance right there."
Although Webb aims to throw seven or eight innings every time out, that was particularly important Wednesday with a bullpen running on fumes. Tony Pena could not pitch for the second straight night after having an infection drained from his right leg Tuesday, while Brandon Lyon and Doug Slaten were unavailable after Lyon threw two innings Tuesday and Slaten pitched in four straight games.
"Tonight was even more so I needed to go [deep] because I knew the bullpen was spent," Webb said. "A little more pressure on myself, but I was able to do it."
Without their two reliable eighth-inning men, a tricky eighth inning almost tripped up the D-backs.
With Webb out after throwing all those pitches, Melvin turned to lefty Randy Choate, making his second appearance since being recalled from Triple-A on Tuesday. He promptly allowed a pair of hits, moving Melvin to bring in Juan Cruz. Cruz struck out two of the next three batters with a walk in between, including a second-out punchout of Olmedo Saenz, who Melvin said is a bad matchup for closer Jose Valverde.
The D-backs then brought in Valverde for his first four-out save of the year, which he completed in perfect fashion for his 25th in 28 chances, starting with a bases-loaded strikeout of Rafael Furcal in the eighth to preserve a victory in what Melvin called the biggest series of the year.
"We put ourselves in a position where we could have lost it all that inning," Melvin said. "The Saenz at-bat's huge, and then Valverde came in, did his thing, closed it out. For Valverde to come in in that situation with Furcal and the bases loaded and no room for error, base hit ties the game, the pitching was unbelievable today."
The D-backs immediately got Webb some support in the first inning on a Chad Tracy sacrifice fly following a pair of walks an and error. That unearned run held up until the seventh, when Arizona tacked on an insurance run.
"With those two guys on the mound you never know what can happen," Tracy said. "You take them when you can get them. The runs are going to be hard to come by with both of them."
Webb credited his defense for helping him get through the seven innings, with catcher Chris Snyder making an aggressive throw to nail the lead runner at third on a bunt, third baseman Tracy making a nice pick to stall a rally by starting an inning-ending double play and right fielder Eric Byrnes throwing out Luis Gonzalez at second trying to take an extra base on a single.
That helped Webb get through a game in which his stuff was not always there, which Webb attributed to mechanically rushing a little bit. In his last start Friday against Baltimore, he said he felt he had some of his best stuff of the year but ended up allowing seven runs (three earned) in five innings of Arizona's only loss in six games to the Orioles.
"It's weird the game, how it goes," Webb said. "I felt great, had great stuff last game and got hammered. Today I felt terrible and didn't give up any runs through seven, so it's just how it goes, but I had great defense behind me. The defense tonight was huge for me. That was the ballgame ... the defense."
Although it's still June, during the game Melvin pondered whether this contest was a must win. He ultimately concluded if there is such a thing as a must win in June then this was it, but in reality a three-game losing streak would feel like a bigger deal while going through it then it actually is.
Must win or not, with their ace on the hill, the D-backs sure needed Wednesday's victory.
"To beat those guys after getting beat two in a row here and have our guy on the mound that we have a lot of confidence in and feel like we're going to win and then come down to the end like that where it's still in doubt, it ends up being a very good win," Melvin said. "Good for our psyche."