The Braves began the day 4½ games behind wild-card leader Colorado.
There was a rain delay of 1 hour, 51 minutes in the middle of the fifth inning, ending Cliff Lee's start for the Phillies.
Hanson (10-4) threw a combined 15 scoreless innings in his last two outings to join Pete Smith (1988) and Paul Marak (1990) as only the third Atlanta rookie to pitch at least seven scoreless innings in back-to-back starts, according to the Elias Sports Bureau.
Hanson, who ended his Sept. 3 start at Florida with two scoreless innings, opened Sunday's game with two scoreless innings to stretch his streak to 19. The string ended when he gave up a run in the third on Ben Francisco's RBI double.
The Phillies tagged Hanson for four runs and seven hits, including four for extra bases, in five innings.
Tyler Walker (2-0) gave up only one hit in two scoreless innings following the delay. Ryan Madson struck out the side in the eighth and Lidge took over with a 4-1 lead to begin the ninth.
With two outs, Lidge walked Brooks Conrad and gave up Brian McCann's RBI single. Lidge struck out Nate McLouth to end the game. Lee gave up five hits and one run in four innings. He struck out two and did not walk anyone.
Lee allowed a first-inning run when Martin Prado doubled and scored on a single by Matt Diaz.
The Phillies took a 3-1 lead with two runs in the fourth. Jayson Werth walked, Raul Ibanez hit an RBI double and Pedro Feliz singled home a run.
Jimmy Rollins led off the fifth with a double and scored on Chase Utley's triple to the soggy right-field corner.
Phillies center fielder Shane Victorino, who returned after missing one start with flu-like symptoms, was ejected in the first inning after he was thrown out trying to steal second base. Second base umpire Chad Fairchild called Victorino out on the throw from catcher David Ross to shortstop Omar Infante.
Victorino threw his helmet down and was ejected for continuing to argue as Fairchild began to walk away.
Chipper Jones had two hits for Atlanta. His third-inning double off the left-field wall was his first extra-base hit since his double at Florida on Sept. 2.
NOTES: The Braves won the season series 10-8. ... Phillies C Carlos Ruiz missed his second straight start after spraining his left wrist Friday night. ... The Braves were missing two starters, 1B Adam LaRoche (sore back) and SS Yunel Escobar (bruised elbow). LaRoche left Saturday night's game early and said he had lingering soreness after taking swings in the batting cage before Sunday's game. Escobar was hit by a pitch in Saturday.