The England skipper scored with a thunderous spot-kick after 59 minutes having been fouled by Slovenia captain Bostjan Cesar to move level with Jimmy Greaves as his country’s joint-third highest scorer on 44 goals.
He is now just five goals behind Bobby Charlton’s all-time record of 49 England goals.
Rooney’s equaliser came two minutes after Slovenia took the lead when Milivoje Novakovic whipped in a free kick and Jordan Henderson sent a header flying past Joe Hart for an own goal.
England secured victory with two goals from Danny Welbeck who struck after 66 minutes with a scrappy left-foot shot before making it 3-1 six minutes later after fine build-up play culminated in a superb one-two with Raheem Sterling. He has now scored five times in his last four England appearances.
The victory maintained England’s perfect start to the campaign and they head the standings with 12 points from their opening four matches.
Slovenia are second with six points from four games and although they were more adventurous in the second half, they posed virtually no attacking threat in a turgid opening 45 minutes.
The only attempt either team had on goal before halftime was when Jasmin Kurtic forced his goalkeeper Samir Handanovic to make a save to stop what would otherwise have been an own goal.
The evening began when Rooney was presented with a golden cap to mark his 100th match by Charlton before kickoff, but that was about the only memorable thing that happened before Slovenia went ahead.
The hosts, who lacked any attacking threat before the break, suddenly came to life in the 59th minute as Rooney sparked their revival after the visitors scored the first goal England have conceded in this qualifying campaign.
Rooney dribbled through the defence until he was tripped by Cesar, who was making his 81st appearance for his country to become their all-time most-capped player.
Handanovic got his hand to Rooney’s penalty but could not stop it going in.
Welbeck, who worked hard alongside Rooney up front, wrapped up the points and the only other England player to emerge from the match with much credit was debutant Nathaniel Clyne, who had a fine game at right back.
(Editing by Ed Osmond)