"He kind of goaded me into it," Dietrich said.
After being inserted into the game in the ninth inning as a pinch-hitter, Dietrich followed Barnhart's advice and hit a two-run homer in the 11th to lift the Cincinnati Reds over the San Diego Padres 3-2 Friday night.
"A lot of his home runs have led to wins," manager David Bell said. "He is doing a great job in the role he is in, being ready whether he is starting or coming off the bench."
Dietrich, who was among two Reds to make the club after being non-roster invitees in spring training, delivered in the clutch.
"I'm always expecting to come through in the big moments," he said. "Why else do you play baseball? Fortunately my spot came back around, and we were able to win a close ballgame."
Dietrich considered swinging at Craig Stammen's 3-0 offering, instead choosing to track it and set up his big swing on the next chance.
"He threw me the same pitch and I was able to put a good swing on it," said Dietrich, who leads the Reds with five homers.
Rookie shortstop Fernando Tatis Jr. opened the inning with an error, and Stammen (2-1) allowed Dietrich's homer two batters later.
Tatis -- who homered in the third inning -- singled off Zach Duke with one out in the bottom of the 11th, stole second and third, and scored on Eric Hosmer's groundout. Michael Lorenzen relieved and got the final out for his first save. Wil Myers struck out to end it.
The Padres have dropped five straight. They squandered an opportunity in the 10th following Ian Kinsler's one-out double that broke his 0-for-10 skid. When Kinsler tried to turn a walking lead at second base into a stolen base, Jared Hughes (2-0) adjusted his motion and pegged Kinsler at third.
"That was a smart move by Jared," Bell said. "If Kinsler makes it to third it changes the whole inning."
Both starting pitchers were sharp. Padres rookie left-hander Matt Strahm worked a career-high eight innings and surrendered a run and two hits with five strikeouts.
Strahm retired 23 of his final 24 batters as he rebounded in his second start at Petco Park after allowing five runs in his debut that didn't last three innings.
"He was great," manager Andy Green said. "I would have love to see him walk away with the win from that game."
Added Strahm: "I just had everything working for me. Attack the barrel and let the ball find the infielders."
Reds right-hander Anthony DeSclafani pitched six innings and was charged with a run, two hits and a walk in his best outing of the season.
DeSclafani struck out six and excelled despite three errors behind him. He stranded the go-ahead run at third base in each of his last two innings.
"I felt great today," DeSclafani said. "Everything was working for me. I just relaxed and threw strikes."
Tatis tied it at 1 with a solo homer, his sixth on the year. The 20-year-old extended his hitting streak to eight games and tied a Padres rookie record with three stolen bases.
Eugenio Suarez turned on Strahm's 0-2 pitch for his fourth homer to push the Reds ahead 1-0 in the first. Suarez snapped an 0-for-13 rut.
Reds: RHP Luis Castillo (1-1, 1.46) is 4-2 in his last nine appearances, which dates to September, and is scheduled to start game three of the four-game set.
Padres: LHP Eric Lauer (2-2, 4.91) is expected to make his club-leading fifth start.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Zimmerman looks for first win as Tigers battle Blue Jays
Jordan Zimmermann hasn't won a game since last September. At this point, he'd probably settle for a quality outing.
Springer, Bregman propel Astros to 6-2 victory over Angels
George Springer and Alex Bregman homered, Wade Miley pitched two-run ball into the sixth inning and the Houston Astros beat the Los Angeles Angels 6-2 Thursday night.
Rosario's pinch-hit 3-run HR lifts Twins in 6-3 win vs. A's
Pinch-hitter Eddie Rosario drove a go-ahead, three-run homer on the first pitch from reliever Yusmeiro Petit in the seventh inning and the Minnesota Twins beat the Oakland Athletics 6-3 Thursday night.
Springer sends dinger No. 22 to right
The Astros put up three runs in the second inning behind George Springer's 22nd home run of the season.
Twins blast late homers to fuel comeback win
The Twins crush three home runs in the 7th and 8th innings, starting with a go-ahead 3-run dinger by Eddie Rosario, in their 6-3 victory over the Athletics.
Strasburg hits and pitches Nationals to 13-4 win over Braves
Stephen Strasburg had a three-run homer among his three hits and set a franchise-record for a pitcher with five RBI, as the surging Washington Nationals beat the Atlanta Braves 13-4 on Thursday night.