Playing as the UK designated hitter, Bernal hammered a pitch down the left field line for a three-run homer in the the fourth inning that broke a 2-2 tie and set the tone for the rest of the night. Freshman second baseman JaVon Shelby added a homer of his own in the sixth as part of a two-hit, three-RBI game for the Cats.
"Any home run's great, but hitting one against Louisville feels really good," said Bernal, who called the game the best of his career.
Bernal just narrowly missed a home run in his first at-bat, a ball that was pulled just foul down the left field line.
"I hope I can keep seeing the ball this well and keep putting the bat on the ball," he said.
No. 19 Kentucky (20-9) also got a strong starting effort from left-handed pitcher Dylan Dwyer, who allowed only two runs on seven hits over 5.2 innings in his second career start, battling out of several early jams.
"I thought he was very tentative early," UK coach Gary Henderson said. "Not very impressed with that piece of it, but very impressed that he kept fighting.
"He's going to be a really good pitcher. There's still a little bit of self-doubt in him that he's going to have to get rid of if he wants to reach his potential, but that will happen for him. His numbers this year have been really good... Dylan Dwyer should be a front-line guy in our league."
Dwyer (2-1) got some help from his defense, including catcher Micheal Thomas throwing out Louisville' Sutton Whiting after a leadoff hit in the top of the fifth. Later in the inning, right fielder Kyle Barrett and Shelby executed a perfect relay throw to nail a Cardinal runner at home plate.
"You bring Mr. Momentum into your dugout," Henderson said of the defensive gems. "Whether you think about it that way or not, you feel it... It's a huge shot of adrenaline."
Zack Brown, Logan Salow and Spencer Jack worked the final 3.1 innings out of the UK bullpen, holding No. 8 Louisville (21-7) to just one run on one hit and two walks. Jack picked up his second save of the season by working the final 2.2 innings with three strikeouts.
Louisville catcher Kyle Gibson hit his first home run of the season in the second inning to give the Cards a 2-0 lead, but it didn't last long as UK battled back with two runs in the bottom of the inning.
Starter Josh Rogers (0-1) took the loss for the Cardinals, allowing five runs on five hits and a pair of walks.
It marked UK's fifth win over a team ranked in the Top 10 this season.