Niuia capitalised on Veikoso Poloniati's sin-binning early in the second half to overturn Tonga's 18-10 lead at the interval as the Samoans used the strength of their forwards to devastating effect to secure the win in Lautoka on Saturday.
Tonga had endured a heavy defeat to Fiji in their tournament opener last week, and there was no place in the squad for former Wallabies centre Israel Folau or ex-All Blacks Malakai Fekitoa and Charles Piutau.
Despite the absence of the high-profile trio, Tonga took early control with a pair of James Faiva penalties followed by tries from Fetuli Paea and Poloniati as their side established an 18-3 lead inside the opening 30 minutes.
But Niuia applied the finishing touch as the Samoan maul drove the Tongans back in the 35th minute and, six minutes into the second half, the hooker completed a repeat performance to further close the gap.
By that point Poloniati had seen the yellow card for tackling Jonathan Taumateine without the ball and, in the 53rd minute, Niuia completed his hat-trick when he peeled off the back of the maul to score in the corner.
Tumua Manu increased Samoa's advantage when he stole possession with an interception inside the Tongan half to race in unopposed and Theo McFarland's pick-up and drive added further to the scoreline as Samoa finally prevailed.
Fiji will be looking to secure their second win in this year's competition later on Saturday when they take on Australia A, who lost their opener against Samoa last week.