The two-time defending NL champions are 43-15 since July 21, when they trailed the Braves by seven games. They are 17-3 in September.
The Phillies reduced their magic number to clinch the division to six.
Rookie Mike Minor (3-2) lasted just 2 1-3 innings in his eighth career start, allowing three runs and seven hits.
Atlanta's Freddie Freeman hit his first major league homer, a solo shot off Halladay in the seventh. Freeman was 1 for 13 before he connected.
Ryan Madson tossed a scoreless eighth for Philadelphia and Brad Lidge finished for his 25th save in 30 chances.
While the Braves used two rookies - Brandon Beachy, who made his major league debut on Monday, - to start the first two games of a crucial series, the Phillies adjusted their rotation so their three aces would pitch.
Halladay followed up another impressive start by 2008 World Series MVP Cole Hamels. Next up is Roy Oswalt. The Braves send Tommy Hanson to the mound as they try to avoid a sweep Wednesday night.
A crowd of 45,264 was the 119th straight sellout at Citizens Bank Park. They stayed in their seats and waved white-and-red "Fightin' Phils" rally towels. On Monday night, a teenager in a head-to-toe red spandex suit ran onto the field and eluded security guards until Braves left fielder Matt Diaz tripped him.
Werth gave the Phillies a 3-0 lead in the third with his fourth homer in five games, and 25th this season.
Placido Polanco walked to lead off the inning and advanced to second on Chase Utley's single. One out later, Werth hit a drive deep into the seats in left-center.
Werth tossed the bat and turned to look at teammates in the dugout before circling the bases, emphatically slapping hands with first-base coach Davey Lopes on his way around.
The Braves got runs in the fifth and sixth to cut the deficit to 3-2, but Raul Ibanez hit a two-run double with two outs in the sixth to give the Phillies a three-run lead.
Alex Gonzalez looped a double to right to start the Atlanta fifth. After Rick Ankiel singled to left, Gonzalez scored on pinch-hitter Eric Hinske's fielder's choice grounder to second. Ankiel broke up a double play by taking shortstop Wilson Valdez's throw off his left hand.
Martin Prado singled to right to start the Braves sixth and Brian McCann hit a double off the wall in right-center. Derrek Lee then hit a sacrifice fly that drove in Prado, but McCann inexplicably tried to advance to third and center fielder Shane Victorino, a two-time Gold Glove winner, easily nailed him with a no-hop throw.
Mike Dunn retired the first two batters in the sixth before he walked Ryan Howard. After Werth lined a single off the left-field wall, Ibanez ripped a liner into the right-field corner to make it 5-2.