Striker Zlatan Ibrahimovic scored twice to put the home side 2-1 ahead in the second leg but the peerless Ronaldo hit back with two magnificent goals to secure a 3-2 win on the night and send his country to next year's tournament in Brazil. (Agencies)
"I know Portugal needed me in these matches and I showed I am here," the Real Madrid forward told Portuguese TV.
"I just did my work as I have been doing lately," added Ronaldo, whose treble means he has equalled his country's all-time scoring record of 47 goals held by Pauleta.
Portugal coach Paolo Bento paid tribute to the contribution of his team's captain and talisman.
"When a player grabs a hat-trick in a match of this scale, naturally he had a huge impact," Bento told a news conference.
In a tie billed as a monumental battle between the Portugal captain and Ibrahimovic, Ronaldo took all the plaudits.
With Portugal leading 1-0 from the first leg in Lisbon, the Swedes dominated first-half possession but created little before Ronaldo tore them apart in the second half, getting in behind the defence three times to score.
Ibrahimovic gave his side hope at 1-0 down when he levelled from a corner and then blasted home a free kick, but two goals in three minutes from Ronaldo put the game out of reach and ended Swedish hopes of reaching the finals.
The defeat was a particularly bitter one for the 32-year-old Ibrahimovic who looks certain to end his career without a World Cup finals goal to his name.
Ronaldo started slowly, wasting several good opportunities in the first half, but when he found his range his finishing at pace was lethal.
Sebastian Larsson missed a great opportunity for Sweden, firing at the goalkeeper from point-blank range, and Portugal went straight up the other end to score.
Ronaldo latched on to a superb through-ball from Joao Moutinho five minutes after halftime to find the net, beating Martin Olsson to the ball and firing crisply past goalkeeper Andreas Isaksson.
Ibrahimovic then raised Swedish hopes with his double strike but Ronaldo was not finished.
He broke clear to bury another left-foot shot into the far corner before rounding the keeper and firing a right-foot strike high into the net 11 minutes from time to send Portugal to the 2014 tournament.
"We allowed Sweden to grow a bit after they drew level. This is why football is a match we never know who will win," Ronaldo said.
The Portugal captain beamed as a fan called out "you are the best in the world," and, after scoring all four of Portugal's goals in the two-legged playoff, he will have the chance to show it at the World Cup finals.
Striker Zlatan Ibrahimovic scored twice to put the home side 2-1 ahead in the second leg but the peerless Ronaldo hit back with two magnificent goals to secure a 3-2 win on the night and send his country to next year's tournament in Brazil.