What was meant to be a glorious celebration of the departure of the sport's greatest showman turned into a condemnation of its biggest pantomime villain as Gatlin, twice banned for drug offences, rolled back the years to win a second world title 12 years after his first and 13 after claiming Olympic 100m gold.
As so often before Bolt made a terrible start but this time he could not make it up as Christian Coleman, the 21-year-old American who beat him in the semi-finals, looked set for victory.
But Gatlin, who stumbled at the death to lose the 2015 world final by a hundredth of a second to Bolt, on this occasion timed his surge and dip to perfection to win in 9.92 seconds.
Coleman, who has run over 40 races this year but turned professional only a few weeks ago, took silver in 9.94.
"It's just one of those things," Bolt said. "My start is killing me. Normally, it gets better during the rounds but it didn't come together."
When the results flashed up on the giant screen the crowd immediately began repeating the booing with which Gatlin's name had been greeted since the heats on Friday.
The crowd responded instead by chanting Bolt's name.
"I tuned it out (the boos) through the rounds and stayed the course. I did what I had to do," Gatlin said.
"The people who love me are here cheering for me and cheering at home.
Bolt is not quite finished yet and will go in the 4x100m relay next week - as will Gatlin.