PHILADELPHIA -- Randy Wolf is relying on his legs to make his arm look better.
Wolf (5-4) allowed six hits, struck out five and walked three in 6 2/3 innings. The left-hander won his fourth straight decision, matching his win total for last season. Ryan Madson got four outs and Billy Wagner worked the ninth, allowing a two-run homer to Jason Ellison.
"I'm really using my legs and my body more when I throw, eliminating the bad habits I developed last year when I was trying to protect my arm," Wolf said. "I trust my slider a lot now. I changed my grip and it made a difference. It breaks later and that makes it harder for a hitter to recognize."
The last-place Phillies have won 10 of 16 and are within two games of .500 (25-27) for just the second time since April 27. They're just 3½ games out of first place.
"We're not paying attention to it," Phillies manager Charlie Manuel said. "We got to get out of the cellar first."
Omar Vizquel went 3-for-5 for San Francisco, which has lost a season-high five consecutive games.
Wolf sparked the Phillies' offense by starting the third inning with a double off the right-field wall against Brett Tomko (4-7). He went to third on Jimmy Rollins' sacrifice and scored on Kenny Lofton's liner up the middle that just eluded second baseman Deivi Cruz.
After Bobby Abreu and Jim Thome walked to load the bases, Pat Burrell fouled out. But Utley lined an 0-2 pitch to left-center field to give the Phillies a 3-0 lead.
"My approach was to put the ball in play," said Utley, who fouled off two pitches before his hit. "Somehow it found a hole."
Pinch-hitter Placido Polanco had a two-run single in the eighth to make it 5-0.
Tomko allowed three runs, five hits and a season-high six walks in five innings. The right-hander walked a total of six batters in his previous five starts.
"I struggled a little bit all night," Tomko said. "It's not fun to lose. It's been a tough year. There's nothing you can do. I just have to go out and pitch the best I can."
Wolf escaped a bases-loaded, one-out jam in the first by striking out Cruz and Edgardo Alfonzo. He got help from Lofton on a questionable catch to get out of trouble in the third.
With two outs and runners on first and third, Cruz hit a sinking liner to center field. Lofton made a sliding catch to rob Cruz, though it appeared on replays the ball was trapped.
"From our bench, we couldn't see it," Giants manager Felipe Alou said. "Five minutes later, somebody said it was a trap. It was too late to do anything."
Wolf has lowered his ERA from 6.52 to 4.57 in his last six starts. The former All-Star is coming off an injury-plagued season in which he finished 5-8 with a 4.17 ERA.
Phillies C Mike Lieberthal became the third player in team history to catch his 1,000th game. ... The Phillies were 15-13 in May, while the Giants were 11-16. It's San Francisco's first losing May since 2001. ... Philadelphia's starters are 10-4 with a 3.48 ERA in the last 16 games. ... Abreu has reached base safely in 22 straight games.