But the Phillies rallied to tie it 4-all in the seventh against Mike Pelfrey and the New York bullpen.
Utley's third homer in two nights that nestled into the right-field corner at spacious Citi Field came on the second pitch from Bobby Parnell (2-1), handing the hard-throwing rookie his first big league loss.
Despite an effective bullpen, it was the Mets' sixth loss this season after leading by at least three runs.
Chan Ho Park (2-1) worked two scoreless innings for the win - with help from Werth. Subbing for injured closer Brad Lidge, Ryan Madson got three quick outs for his third save.
The Mets stranded a season-high 16 runners, eight from innings seven through 10. Still, they nearly won it when David Wright hit a two-out liner into the right-center gap in the 10th.
Werth could have played the ball on a hop, but he made an all-out dive for it - probably not such a wise decision with speedy Fernando Martinez running from first.
If the ball gets past Werth, Martinez probably scores the winning run. But Werth made the play, snaring the ball on his backhand just before it hit the ground.
Wright, who had three hits and two stolen bases, yanked off his helmet in frustration at first base. He also made a key error in the seventh.
Jimmy Rollins went 0 for 5 with an RBI for the Phillies in his return to the leadoff spot after two games batting sixth.
Philadelphia is 6-3 on a 10-game trip, improving to a major league-best 22-9 away from home.
New York dropped to 18-10 at Citi Field with only its fourth loss in 16 home games. The Mets are 4-2 against Philadelphia this season, but they trail the first-place Phillies by three games.
It was Philadelphia's first win in four games at New York's new home.
Coming off a five-hit shutout of the Los Angeles Dodgers, Hamels allowed four runs and 11 hits over five innings.
"We have to beat him," Mets outfielder Carlos Beltran said before the game. "That's the way we have to approach him."
Pelfrey pitched into the seventh and helped himself with the bat. He doubled and scored in the third, then had a bloop RBI single in a three-run fourth.
The right-hander was coming off an 11-6 loss at Pittsburgh that he called the worst outing of his career. He allowed nine runs - eight earned - and nine hits in 3 2-3 innings in that one.
The Phillies chased Pelfrey by loading the bases on three straight singles to start the seventh. The third one was Werth's drive to deep center that Beltran appeared to have lined up, but the ball glanced off the inside heel of his glove as he mini-jumped at the wall.
Expecting Beltran to make the catch, Ryan Howard was ready to tag up at second. So when the ball dropped, the runners were only able to advance one base each.
Pedro Feliz hit an RBI single off Sean Green, and another run scored when Wright booted Carlos Ruiz's bouncer to third for an error. After pinch-hitter Paul Bako struck out, Rollins tied it with a groundout.
Pelfrey opened the third with a double off the base of the left-field fence. He scored on a fielder's choice grounder by Alex Cora.
Utley hit a solo shot in the fourth. He has 15 homers this season.
NOTES: Wright has 16 stolen bases, surpassing last season's total of 15. ... The two hits were a career high for Pelfrey, who entered 1 for 17 with two RBIs this season. The double was his second career extra-base hit. ... Wright had 14 hits in 20 at-bats before fouling out to right field with two on to end the eighth against J.C. Romero.
NEW YORK SPORTS AND MORE
SEND TIP OR PHOTO || REPORT TYPO || GET WIDGET
EYEWITNESS TWITTER || FIND US ON FACEBOOK