Bolt, 29, ran 9.81 seconds in his final Olympics to replicate his success at Beijing 2008 and London 2012.
Twice banned for doping offences, Gatlin was 0.08 seconds behind Bolt, with Canada's Andre de Grasse in third.
"Somebody said I can become immortal," said Bolt. "Two more medals to go and I can sign off. Immortal."
De Grasse took bronze in a personal best of 9.91, ahead of Bolt's Jamaican team-mate Yohan Blake.
There was no British interest in Sunday's showpiece as CJ Ujah and James Dasaolu were eliminated in the semi-finals.
Bolt remains on target to leave Rio with a third successive Olympic treble, having won the 100m, 200m and 4x100m relay titles in 2008 and 2012.
"It wasn't perfect today, but I got it done and I'm pretty proud of what I've achieved," he said. "Nobody else has done it or even attempted it.
"I expected to go faster, but I'm happy that I won. I did what I had to."