Gattis saw four pitches from the Phillies lefthander and took three swings. Gattis likely generated 1.21 gigawatts of power with each of those swings, with a trio of baseballs launched some 1,200 feet from home plate.
With the Phillies' offense sputtering along, Hamels looked like he'd be in line for another hard-luck loss or no-decision. But then the Phillies' own righthanded thumper saved him.
Darin Ruf led off the eighth inning by ripping a 95 mph fastball from David Carpenter over the fence in right-center to snap a tie and deliver Hamels and the Phillies a 3-2 win.
"That was a good time to pull through and drive one," manager Ryne Sandberg said of the game-winning blast.
Ruf's 13th home run of the season bested Gattis' two bombs, at least on the final scoreboard. According to Phillies measurements, Gattis' homers traveled a combined 865 feet.
His first, according to ESPN's Home Run Tracker, was launched a Citizens Bank Park record 486 feet. Before yesterday, the furthest hit ball at the 10-year-old ballpark came courtesy of a Ryan Howard home run off the Mets' Orlando Hernandez on Aug. 30, 2007.
"A tornado might've been blowing and the first one would've gotten out of here," Sandberg said. "That was dead into the teeth."
"I just sat back and watched," Ruf said. "I played with him in Venezuela [winter league], so I know him a little bit. I want him to do well - obviously not against us."
Gattis' record blast also may have given Ruf something to shoot for.
"I'll take them one row deep, too," Ruf said, wisely recognizing they all count the same on the scoreboard.
Gattis didn't get a chance for a hat trick of home runs after Ruf's go-ahead shot. Due to hit fifth in the ninth inning, Gattis never got to the plate as B.J. Rosenberg stepped in for an unavailable Jonathan Papelbon and recorded a 1-2-3 inning for his first career save.
The win completed a three-game sweep, the Phillies' third of the season and first in more than 3 months. The fact that it came against the league's best team, and a team that has been running away with the National League East since the beginning of the summer, made it a little more meaningful for the Phils.
"I look at it like a benchmark of where we need to be, need to get to," Sandberg said. "But we rose to the occasion and played good baseball in all aspects of the game. It's good. It's something we can build on for the rest of the games we have. Especially the young guys."
The older guys are thankful the younger guys, like Ruf and Rosenberg, are contributing to wins they couldn't put away earlier this season.
In the season's first 2 1/2 months, the Phillies were 2-13 in Cole Hamels' first 15 starts. They had scored two runs or fewer in eight of those 15 games.
Hamels' luck hasn't improved much in the 3 months that have followed. Of the 83 major league pitchers who qualify, only seven have received a lower run-support average than Hamels' 3.23 per start.
Since the beginning of July, Hamels has pitched well enough to lead the Phils to wins despite the paltry support. Hamels has a 2.18 ERA in his last 14 starts; he has allowed more than two runs in just two of those games.
Hamels' late-summer surge continued yesterday, when he didn't allow a Brave not named Gattis to record a hit. Hamels walked two, struck out nine and induced 10 groundball outs.
"He was outstanding," Sandberg said. "It was about time we had a late-inning run to give him."
That run was a result of Ruf's 11th homer in his last 35 games. Ruf finished the day 2-for-4 with two RBI.
In his pivotal eighth inning at-bat, Ruf got behind 0-2 two pitches in, but then laid off three balls out of the strike zone. The sixth pitch was a fastball out over the outer half that Ruf didn't miss.
"It was a good sign for Darin to go right-center like that," Sandberg said. "He seems to get a lot of pitches away, and it's a good sign he stayed on that one in a big moment. But that's what he needs to continue to do, utilize the whole field, go with pitches away like that."
For three games in September, the Phillies (66-77) hung with the Braves (85-57). It won't matter next month, when Atlanta is in the playoffs while the Phils are at home watching.
But, as Sandberg said, perhaps it's something to build on for 2014. The Phillies improved to 13-10 since Sandberg took over for Charlie Manuel last month.
"It's great to just play well in all facets of the game," Ruf said. "Pitching, defense, swinging the bats well. It was nice to see what we can do when all phases of the game is clicking for us."
On Twitter: @ryanlawrence21