The victory, Penn State's 30th in a row over Temple, marked the end of nonconference play for the Nittany Lions (2-2) and gave them some confidence going into next week's Big Ten opener at Illinois.
"We've been able to string drives together and string plays together more, so that's definitely a confidence boost for our offense," said wide receiver Allen Robinson, who caught a 41-yard touchdown pass from McGloin.
"We know our defense has been playing great the past few games. They've been holding teams to a few points and getting turnovers. So I'm not really concerned about our defense. I know they're going to play well."
The young Owls (1-2), meanwhile, have a week off before their Big East renewal on Oct. 6 against South Florida. They'll be trying to revive an offense that gained just 237 yards - 65 of them in the game's dying moments when they scored their only touchdown.
Their pass defense didn't have much success against McGloin, although the unit recorded an interception in the red zone, by Tavon Young, and had its hands on at least two more picks that were dropped.
"I thought Penn State was the better team, no question about that," Temple coach Steve Addazio said. "We had our opportunities in that game. We had our opportunities to make some plays that we didn't make. In that kind of game, we need to make those plays."
Given the potency of the Penn State offense - 173 rushing yards, 78 offensive plays, a near 15-minute advantage in time of possession - the game probably shouldn't have been as close. But the Lions were nailed nine times for 100 yards in penalties after being assessed for 11 penalties total in their first three games.
"I was disappointed," Penn State coach Bill O'Brien said. "We have got to do a better job on that. The one thing we prided ourselves on after the first three games was doing a good job of not being penalized. Today I felt like we took a step back on that."
The Owls confused the Lions with blitzes in the first half and appeared as if they would be going in down by only 7-3 at the half. But a Penn State punt backed them up to their 7, and they went with three straight basic running plays, with the Lions calling a timeout after each one.
A good punt return by Jesse Della Valle put the Nittany Lions at the Temple 35 with 1 minute, 10 seconds to play. McGloin hit tight end Kyle Carter for 13 and 20 yards, and a personal foul penalty against the Owls put the ball on the 1. McGloin then barged in for the score, carrying Temple defensive end Marcus Green on his back, with 22 seconds remaining to make it 14-3.
"At that point, when you get so close to the end zone, you kind of push forward and do whatever you can to get in," said the 6-foot-1, 210-pound McGloin.
"That was a huge drive going into halftime," O'Brien said. "Any time you score like that in a tight ball game right before halftime, that usually bodes well for you."
Penn State had two long ball-control drives in the second half, leading to McGloin's second touchdown and a 21-yard field goal by Sam Ficken, his first since his 1-of-5 kicking nightmare at Virginia.
Temple had its struggles. Quarterback Chris Coyer finished the game 13 of 26 for 124 yards, but 65 of them came on the Owls' final drive, capped by Coyer's 1-yard touchdown toss to Matt Brown.
From the Penn State 7 in the second quarter, Coyer overthrew tight end Cody Booth, who was wide open in the end zone. The Owls had to settle for Brandon McManus' first of two field goals.
"It's absolutely frustrating," Coyer said. "We put in two good weeks of work preparing for this game. So it definitely hurts a little bit to miss some of those opportunities and lose this game."
Contact Joe Juliano at 215-854-4494 or jjuliano@phillynews.com or follow him on Twitter @joejulesinq. Read his blog, Lion Eyes, at www.philly.com/philly/blogs/inq-pennstate