With 30 minutes left to play, the hosts led 2-1 and had a one-man advantage, following Helder Postiga's first-half dismissal.
However, Brunt then picked up his second yellow card for a rash tackle on Joao Pereira - a moment that swung the momentum in Portugal's favour.
Within 17 minutes of Brunt's sending-off, Ronaldo scored twice to restore his side's lead, which had earlier been given to them by defender Bruno Alves.
Ronaldo then completed his hat-trick with a trademark free kick, after Lafferty had seen red for a late lunge on Pereira.
Alves put the Group F favourites in front midway through the first half, guiding a neat volley into the corner of Roy Carroll's net after Oliver Norwood's header had failed to properly clear Joao Moutinho's outswinging set piece.
McAuley was on the receiving end of a tame headbutt that saw Postiga shown a straight red card moments later.
Buoyed by their numerical advantage, Michael O'Neill's men went ahead just after half time when Jamie Ward scored his first senior international goal.
However, Brunt and Lafferty's dismissals then provided the Group F favourites with space, which was exploited to great effect by Ronaldo.