Cain completed his first eight passes and the Utes scored two touchdowns 18 seconds apart to take control early and help get going again after a 31-24 loss at Oregon last week that ended the nation's longest active winning streak.
Wide replaced Matt Asiata, who left after a knee injury on the game's first touchdown, and made many of his 19 carries on direct snaps with Cain often lined up in the slot position.
After Louisville closed to 23-14 in the fourth quarter, Cain capped an 80-yard drive with a wide receiver screen to Jereme Brooks, who outran the Cardinals for a 34-yard touchdown.
Cain completed 17 of 22 passes for 202 yards.
The most anxious moment for the Utes came when Cameron Graham grabbed a tipped ball off receiver Scott Long's hands and scored a touchdown with 8:51 remaining in the final quarter to cut Utah's lead to 23-14.
Utah is now 4-0 against Louisville. The teams' only prior meeting in Salt Lake City was the first game played in Rice-Eccles Stadium on Sept. 12, 1998. Utah has won 12 straight in the stadium.
Since the Bowl Championship Series began in 1998, Utah has won 18 games against teams from automatic qualifying conferences, more than any other non-BCS school. The Utes are 7-0 against current members of the Big East Conference.
On a drive fueled by Wide's 25-yard scamper, Joe Phillips hit his third field goal with 12:34 left in the game to put the Utes ahead 23-7 in front of a homecoming crowd that numbered 45,588, sixth-largest in team history.
The Utes seemed to make all the big plays right from the start. R.J. Stanford blocked Ryan Payne's field goal attempt to thwart Louisville's quick-striking first drive that had the Cardinals first-and-goal at the Utah 8-yard line.
Asiata took a pitch to the left side midway through the first quarter and broke four tackles on his way to a 24-yard touchdown run that opened the scoring. After the score, Asiata, who led the Mountain West Conference with a 101-yard rushing average, went straight to the locker room.
Utah's highly touted offensive tackle, Zane Beadles, also left the game with a cut leg in the third quarter.
After two thrilling plays, Utah was in the end zone again. Koa Misi chased Louisville's Trent Guy on a reverse and forced a fumble from the back side that Robert Johnson threw back into the field of play as he fell out of bounds. Stanford recovered the ball for Utah.
On the next snap, Cain lofted a 42-yard pass that was caught in stride by David Reed for a touchdown -- and the longest play from scrimmage against the Louisville defense this season.
Late in the second quarter, Joe Phillips added field goals from 30 yards and 48 yards to give Utah a 20-0 lead at the half.
Chaz Thompson intercepted Cain on the Utes' first possession of the second half, which led to Justin Burke's 8-yard touchdown scramble with 7:47 left in the third quarter to get Louisville on the scoreboard. Burke was 15 of 33 passing and was sacked six times.