ATLANTA — Hunter Pence hit a ball, and the third baseman dropped it. Brandon Belt hit a ball, and the second baseman threw it to the shortstop, who dropped it.

Desperate for any break an opponent gives them, the Giants capitalized Tuesday night and enjoyed a feeling they haven’t had in nine days.

After the two misplays, Austin Slater hit a three-run home run to erase a two-run deficit, and the Giants beat the Braves 6-3 on Tuesday night, their first win since June 11.

End of a seven-game losing streak? Stop the presses. A high-five line after the final pitch? Say it ain’t so. Clubhouse merriment? It’s about time.

“We got a couple of breaks with the ground attack, and Slater bailed us out,” manager Bruce Bochy said. “It’s a big win. When you get in a rut like we’ve been in, this is big for the boys, for their psyche and morale.”

Matt Moore earned his first win since May 13 and Mark Melancon his first save since May 27. Both could thank Slater for putting them in advantageous positions with his eighth-inning homer, which turned the momentum and ignited a five-run rally.

Slater homered down the right-field line against Julio Teheran, who baffled the Giants most of the night, and is hitting .340 and manning left field until further notice.

“Obviously, he shows a lot of trust in me so far,” Slater said of Bochy. “I’m trying to show him I can take that job and run with it.”

Two of the Giants’ runs were unearned as the Braves’ defense collapsed in the eighth, making three errors. The rally began when Johan Camargo failed to field a grounder by Pence, who got a hit. Brandon Belt hit a possible double-play ball to second baseman Brandon Phillips, whose throw to shortstop Dansby Swanson was dropped.

At first, it was ruled an out, but the play was reviewed and the call overturned.

“It was nice to see one of those calls go our way,” said Slater, who followed with his second career homer. “It feels like when you’re on a streak like we were, dinkers fall and calls don’t go your way. It was good to get out of that rut.”

Belt knows all about how bad breaks can burn a guy. In Monday’s opener, he was robbed by the Braves on two diving catches and seemingly again by an umpire calling him out at second for not being on the bag after sliding in with an apparent double.

Tuesday, the breaks went the Giants’ way. In the ninth, Belt tried to bunt on a 2-0 count and fouled it off. Then, he hit his team-leading 12th homer.

It was an insurance run for Melancon, who converted an uneventful save situation — three groundball outs — two days after his meltdown in Denver, when he gave up Nolan Arenado’s game-ending homer that completed a cycle.

For Moore, who pitched one batter into the eighth inning, it was his first road win since Sept. 11. He had gone 0-5 with a 10.42 ERA in nine road starts since then.

Before the game, Giants players had a quick meeting, and laughter was heard from a distance.

“What’s amazing is, the clubhouse before the game, it was loose,” Bochy said. “They were still having fun, trying to keep each other loose doing some things. You could hear them laughing.”

John Shea is The San Francisco Chronicle’s national baseball writer. Email: jshea@sfchronicle.com Twitter: @JohnSheaHey