Smith took a break from his starting duties and entered the game as a pinch hitter in the final frame of the 8-6 win at Dodger Stadium. The home run off Giants relief pitcher Tyler Rogers left his bat at 105 mph, according to Statcast.
"I was just trying to get a pitch I could drive and hit," Smith told reporters. "I put a good swing on a slider and it got in the air and got out."
Dodgers shortstop Chris Taylor went 3 for 4 with two homers, four runs scored, three RBIs and a walk in the win. The Dodgers won the game despite stars Mookie Betts and Justin Turner exiting early due to injuries.
"That was huge for us. Obviously, this is a huge series," Taylor told reporters. "They took the first game from us and jumped out to an early lead [Tuesday].
"For us to stick with it and comeback and find a way, that was probably our biggest win of the year so far."
Muncy gave the Dodgers a 1-0 lead with an RBI single in the first. The Giants responded with five unanswered home runs to take a 6-1 lead into the bottom of the fifth.
Left fielder Alex Dickerson, shortstop Thairo Estrada, first baseman LaMonte Wade and right fielder Mike Yastrzemski each went deep as part of the power surge.
Taylor hit his first homer of the night off Giants starter Alex Wood in the bottom of the fifth. That 416-foot, leadoff solo shot cut the deficit to four runs. Dodgers catcher Austin Barnes plated outfielder Cody Bellinger with an RBI double in the bottom of the sixth.
Taylor clubbed a 393-foot, two-run homer three at-bats later to make the score 6-5. Rogers entered the game to replace relief pitcher Jake McGee in the bottom of the ninth.
He walked Taylor and Matt Beaty in his first two exchanges. He then threw a fastball for a called strike on his first pitch to Smith.
Smith belted his second offering, a heart-of-the-plate slider, to left center field for the game-winning blast.
The Dodgers (59-37) and Giants (59-35) continue the rivalry series at 7:10 p.m. PDT Wednesday at Dodgers Stadium.