Chen went a game up, but defending champion Lin fought back to take the second before a show of power and agility in the third saw him win the match 12-21, 21-16, 21-16.
It meant that 25-year-old Chen remains without a win against 'Super Dan', 30, widely regarded as badminton's best-ever player, with a 0-7 record in their head-to-head.
A confident Chen was in attacking mood in the first game, surging to an 11-4 lead. Lin tried to push back, but found it hard to close out the points as Chen dug out returns and blocked powerful drives.
Lin looked flat in the last part of the first game, putting the final two points in the net for Chen to take it 21-12.
The second game was a mesmerising duel as Lin closed Chen's early three-point lead and went into the break 11-8 up after a driving backhand pass, followed by an unreturnable body shot.
Chen punched back to 16-16, keeping his head in complex rallies before his veteran team-mate turned on the class.
Lin nonchalantly took the fire out of Chen's driving shots and beat him with lightning reflexes at the net before winning the game 21-16 with a cross-court smash.
In the break before the third, the match turned into a battle of the torsos with women in the crowd screaming as Chen changed his shirt, only for Lin to decide to do the same, provoking a louder response.
The third was another tussle with Chen taking an early lead and Lin pulling back, reaching for everything Chen put his way and closing to 8-8 with a lucky net cord shot.
Lin went into the break up 11-8 after Chen put two in the net and the champion went on to unleash a volley of fast returns, lunging and diving, with his younger rival forced into defence mode.
Chen had chances, but couldn't convert, berating himself as Lin stretched ahead to take the third game and the match 21-16.
Lin turned to the crowd and pumped his fists after his victory, again removing his shirt and replacing it with a Chinese flag thrown down to him from the stands, while a disconsolate Chen stood on the sidelines waiting for a handshake.
As Lin's fans gathered outside the Gyeyang arena, banging on the windows to take a picture with him, the Chinese star said fierce air conditioning had made the job tough.
"I'm happy I took the gold medal. Chen Long and I have had a difficult tournament because of the wind on the court, but we played a very good match for the crowd," said Lin, echoing complaints from several players in Incheon.
Asked whether anyone else could replace him as a Chinese shuttling legend, Lin pointed to team-mate Chen.
After a match in which Lin Dan's name was being constantly yelled by the crowd, a gracious Chen said it did not upset him.
"We're all from China and whoever wins, it's OK. I just try my best."