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.
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.”
Bolt was slower out of the blocks than 34-year-old Gatlin, who was aiming to regain the title he won at Athens 2004.
But the Jamaican surged through from 60 metres to pass Gatlin and comfortably win his seventh Olympic gold.
Bolt received a hero’s reception as he walked out into Rio’s Olympic Stadium before the race – and the crowd chanted his name after his victory, too.
“It wasn’t about the time, it was just about winning the gold and going out on top,” said Michael Johnson, four-time Olympic champion.
Bolt, who said in February he would retire from athletics after the 2017 World Championships, competes in qualifying for the men’s 200 on Tuesday, with the 4x100m relay beginning on Friday.
The world record holder at 100m and 200m showed an expectant Rio crowd he was in great shape by clocking a season’s best 9.86 in his semi-final.
The sport’s greatest showman then produced an even better run when it really mattered to send the Olympic Stadium into raptures.
“After the semi-final, I felt extremely good,” Bolt added.
“I wanted to run faster but with the turnaround time – we normally have two hours but we had one hour 20 minutes – it was challenging. This is what we train for. I told you guys I was going to do it. Stay tuned. Two more to go.”
In stark contrast to Bolt’s reception, Gatlin walked out to the start line to a chorus of boos, but he was unmoved.
He insisted his rivals respected him and urged the critics to get to know him, telling BBC Radio 5 live: “I have worked hard to get on the podium. I’m honoured to be here for my country.”
Gatlin’s first drugs ban in 2001 was reduced from two years to one after he proved the amphetamines he was taking were for an attention deficit disorder.
He then tested positive for testosterone in 2006, a year after winning the 100m and 200m double at the World Championships.
The American served a four-year ban that was twice reduced, first from a lifetime then to eight years.
Gatlin returned to the track in 2010, claiming Olympic bronze at London 2012 and losing to Bolt in the 2015 World Championships.-BBC