Piutau, who was celebrating his 34th birthday in his 43rd and final test at his third World Cup, scored a try and kicked the last conversion at Hanazono Rugby Stadium as the Tongans finished off their tournament in style.
Tongan prop Siegfried Fisi'ihoi opened the scoring and centre Malietoa Hingano crossed to give the Pacific islanders the lead around the hour mark, with fullback Telusa Veainu adding the fourth try after the final gong.
Replacement Mike Te'o had scored two tries with his first two touches in four first-half minutes to give the United States a 12-7 halftime lead and flanker Tony Lamborn added a try two minutes from time, but the Americans will go home winless.
For much of the 80 minutes it was easy to remember that these were two teams that had failed to secure a victory between them in six previous matches, albeit in a tough Pool C that also include England, France and Argentina.
After a moment's silence to remember those affected by Typhoon Hagibis, which ripped through the Tokyo area overnight, the Tongans looked desperate to make the quick start that had eluded them in their previous matches.
A combination of poor choices in attack kept them off the scoresheet until the 17th minute when winger Viliami Lolohea shoved aside a couple of tacklers for a 40-metre break and Fisi'ihoi forced his way over the line.
Two minutes later Eagles skipper Blaine Scully was forced off injured and replaced by Te'o, who plays scrumhalf, winger and fullback but has the build of a prop.
The Californian had immediate impact on the right wing, taking a sublime one-handed offload from number eight Cam Dolan to score his first try before adding a second from a similar position after a lofted pass from fullback Will Hooley.
The Tongans came out firing in the second half to try and reel in the Eagles but more poor decision-making saw them waste overlap after overlap.
Sonatane Takulua took a shot at goal to cut the deficit to three points in the 51st minute and Hingano got the Tongans back in front when a hack through from a turnover found no one at home in the U.S. defence seven minutes later.
Piutau found a gap in the same defence to slide through and score his try four minutes later but the Americans have always shown plenty of fight in this tournament and they got some reward in 78th minute.
The Eagles pack forced their way to the line and Lamborn touched the ball against the base of the post for a try that gave them hopes of unlikely victory, only for the Tongans to score again through Veainu.