McGloin amassed 282 yards and tossed a pair of touchdowns as the Nittany Lions (4-2, 2-0 Big Ten) reeled off 22 fourth-quarter points to come away with their fourth straight victory.
Michael Zordich and Allen Robinson added late touchdowns in Penn State's comeback.
The Wildcats (5-1, 1-1) fell short in their bid to start 6-0 for the first time since 1962.
Trevor Siemian completed 21-of-36 passes for 135 yards and a touchdown while Venric Mark returned a punt 75 yards for a touchdown in the loss.
Celebrity Families of 2014 [PHOTOS]