Burrell hit his 29th homer of the season, a solo shot with an out in the sixth that proved to be the difference. Burrell also homered on Friday night in the Phillies' 1-0 win over San Diego.
Brad Lidge struck out the side in the ninth - and gave up a walk - to pick up his 30th save in 30 chances. Lidge has recorded 33 consecutive saves dating to last season.
Hamels overcame the lack of run support, which has hampered him during his career-high skid. Hamels was 0-3 with a 3.61 ERA during the run and the Phillies scored three or fewer runs in six of his last eight starts.
The left-hander has allowed two or fewer runs in seven of his last nine starts and 10 of 14.
Philadelphia has struggled offensively in its last 11 games having scored only 32 runs.
San Diego has lost nine consecutive home series since winning two of three against the Los Angeles Dodgers, June 10-12. Since then, the Padres have lost 20 of 27 at home.
Jimmy Rollins got the Phillies going in the first inning with a single off Cha Seung Baek (4-7). He stole second and continued to third on catcher Luke Carlin's throwing error. Jason Werth followed with a sacrifice fly.
Burrell then homered off Baek to give Philadelphia a 2-0 lead in the sixth. The RBI tied him with Greg Luzinski (811) for eighth place on the Phillies' all-time list.
The Padres strung together consecutive one-out singles by Kevin Kouzmanoff, Adrian Gonzalez and Chase Headley to cut the lead to 2-1 in the sixth.
Baek allowed two runs - one earned - on four hits over six innings. He dropped to 0-7 at home with a 5.86 ERA in eight starts.
Notes: San Diego is 14-30 against left-handers. ... Hamels hit Gonzalez with a pitch, his first this season. ... The Phillies are 55-0 when leading after the eighth inning. Philadelphia is one of five big league teams who are undefeated with a lead heading into the ninth inning. ... Padres' first-round draft pick Allan Dykstra took batting practice. Dykstra, who signed his contract on Friday, was a freshman when Hamels was a senior at the same San Diego area high school, although they were not teammates on the varsity team.