The game finished 1-1 in regulation time, with a late goal from Malaysian forward Thamil Arasu cancelling out a spectacular strike from Bayu Gatra after 30 minutes of a game which the Indonesians dominated.
Extra time was a dour affair with both teams flagging on the large pitch at the purpose-built Zeyar Thiri stadium in Myanmar's remote capital Naypyidaw.
Malaysia had their first two penalties saved, easing the pressure on the Indonesian penalty takers.
The win was sweet revenge for Indonesia, who lost by the same scoreline on penalties to their neighbours in the 2011 final in front of a 90,000-strong home crowd in Jakarta.
The Malaysians were bidding for their third straight SEA Games gold in the showpiece event of the hotly-contested competition.
After a frantic start, the Indonesians began to assert themselves, zipping the ball across the pitch.
But neither side could craft a breakthrough, with both defences playing deep.
Bayu Gatra broke the deadlock, turning expertly on the right-hand side near the halfway line, before darting inside and playing a one-two on the edge of the box.
He then clipped the ball over the advancing Malaysian keeper.
With time running out Malaysian striker Thamil Arasu hooked the ball home from six yards after Indonesia failed to clear a low corner, sending the game into extra time.
On Saturday Indonesia will try to end their SEA Games hoodoo after going more than two decades without winning gold.