A chaotic World Cup qualifier saw the hosts come back from 1-0 down but Helder Postiga's red card was countered by Chris Brunt's and Kyle Lafferty's in the second half
The Real Madrid star netted his 41st, 42nd and 43rd international goals in a devastating 15-minute spell in the second half at Windsor Park to become Portugal's second-highest scorer ahead of Eusebio. Ronaldo is now four behind the country's all-time leading goalscorer Pauleta.
The result keeps Portugal just a point behind Russia at the top of Group F in the European qualifying section, while Northern Ireland's slim hopes of reaching the play-offs are now over.
Bruno Alves and Gareth McAuley traded headed goals for either side in the first half, before Helder Postiga was shown a straight red card for Portugal.
Jamie Ward then gave Northern Ireland the lead after the break before Ronaldo took over and single-handedly gave the visitors all three points as both Chris Brunt and Kyle Lafferty were dismissed for the hosts.
Northern Ireland manager Michael O'Neill recalled Jonny Evans, Lee Hodson and Brunt to his starting XI as Aaron Hughes and Craig Cathcart were ruled out through injury, while Daniel Lafferty was suspended.
Ronaldo captained Portugal in attack, with head coach Paulo Bento preferring Vieirinha over Nani on the wing.
The hosts were full of confidence after recording an impressive 1-0 victory over Russia in their last qualifier, but it was Alves who opened the scoring after 19 minutes.
A Joao Moutinho corner was contested at the near post and the ball found Alves unmarked on the edge of the penalty area, and the Fenerbahce man coolly volleyed home.
McAuley then equalised for the hosts after 35 minutes, as he rose highest to direct the ball goalwards from six yards from Shane Ferguson’s corner.
And Northern Ireland’s chances were boosted further shortly after when Postiga was shown a straight red card for head-butting McAuley in full view of referee Danny Makkelie.
O'Neill's men came flying out of the traps after the interval and Ward put them ahead after 51 minutes as he reacted to a Jonny Evans flick-on to divert the ball past Rui Patricio.
However, Brunt was then red carded for the hosts on 61 minutes after a second-bookable offence for a late challenge on Joao Pereira and Ronaldo put the visitors back on level terms just seven minutes later as he headed home from a Moutinho corner.
The 28-year-old then scored his second and Portugal's third of the game with another header 13 minutes from time.
Lafferty was then given his marching orders for a dangerous lunge on Pereira, before Ronaldo completed his treble on 82 minutes with a free-kick from 20 yards.