Andretti Autosport's Herta made his final pitstop a lap sooner than Palou and paid the penalty in the closing stages, as he was forced to lower his pace and tumbled back to finish fifth.
Josef Newgarden (Team Penske) finished second, ahead of a closely matched Pato O'Ward (Arrow McLaren) and Scott Dixon (Ganassi).