Bolt, 29, ran 9.81 seconds in his final Olympics to replicate his success at Beijing 2008 and London 2012.
Gatlin, twice banned for doping offences, finished 0.08 seconds behind Bolt to take silver.
"I expected to go faster, but I'm happy that I won," Bolt told BBC Sport. "I'm here to perform. I did what I had to."
Canada's Andre de Grasse took bronze in a personal best of 9.91, ahead of Bolt's Jamaican team-mate Yohan Blake.
(BBC News)