Gatlin, who has served two doping bans, jeered by London crowds as Bolt finishes third in his farewell race.
Tributes for Usain Bolt as tetchy Justin Gatlin defends 100m win at worlds
American veteran Justin Gatlin was booed after he stunned Usain Bolt to win the 100m world title in London on Saturday and rain on the Jamaican's farewell race in the blue riband event.
Gatlin, who has served two doping bans and won silvers behind Bolt at the last two world championships, clocked 9.92 seconds, with teammate Christian Coleman winning silver in 9.94sec.
Bolt suffered a dreadful start and could only claim bronze in 9.95sec.
"I'm sorry I couldn't end it on a winning note, but I want to thank you for your support," said Bolt, who embraced Gatlin after they streaked through the line with no clear victor immediately apparent.
"It's been a wonderful experience as always."
Gatlin was afforded the same rough reception as he had in the heats and semi-finals, loud boos and jeering ringing around the same stadium where in 2012 his rivalry with Bolt was presented as 'good against evil', given the American's doping-tainted past.
"I tuned it out [the boos] through the rounds and stayed the course," Gatlin said. "I did what I had to do. The people who love me are here cheering for me and cheering at home.
"It is Bolt's last race. I have had many victories and many defeats down the years. It is an amazing occasion. We are rivals on the track but in the warm-down area we joke and have a good time."
Gatlin insisted he was "no bad boy" and said he should be treated like anyone who is given a second chance by society.
"I'm just a runner," he said. "I'm back in the sport. I've done my time and I've come back.
"I've done community service, I've talked to kids, I've actualy inspired kids to walk the right path.
"That's all I can do. Society does that for people who make mistakes. That's why I'm still back in the sport, still running and believe in myself."
The jeering did indeed continue unabated after it became clear Gatlin, a sprinter whose past divides track and field, had gatecrashed Bolt's party.
Gatlin initially put his finger to his pursed lips as if to hush the crowd, before dropping to his knees to bow down to Bolt.
"The first thing he did was congratulate me and say that I didn't deserve the boos. He is an inspiration," Gatlin said of Bolt.
Coleman added: "It was an historic moment for me to beat Bolt who has taken this sport to another level and who I watched as I grew up. A humbling experience.
"I'm delighted for Justin as we have bonded and become close. I was impressed by the way he handled the pressure and the crowd."
Gatlin has form as the last man to beat Bolt over 100m - by a hundredth of a second in Rome in 2013 - and at the age of 35, can still produce the goods, something he has in the past ironically credited with his four years of forced exile from the track.
The evening was all supposed to be about Bolt, 30, claiming a remarkable 12th world gold to add to his eight Olympic golds in what has been a glittering career.
And what a gaping hole his absence will leave, no matter how brave a face track and field's governing body the IAAF try to put on it.
Of his 19 global golds, 13 have come in individual events and allied with a charismatic personality, it has guaranteed Bolt recognition as one of the world's most successful sportsmen.
"It feels like most of Kingston is in Stratford tonight," the stadium announcer said of the welcome afforded Bolt in the eastern London stadium now home to West Ham United United in the Premier League.
In temperatures of 19 degrees Celsius, Bolt the showman demonstrated exactly what athletics will miss when he bows out.
The sell-out 60,000 crowd roared as he entered the stadium to do his final warm up on the track.
Stripped to a vest and tight shorts in the black, green and yellow of Jamaica, chants of "Usain Bolt" rang around in a surprisingly tense atmosphere.
Gatlin, on the other hand, was emotionless as loud jeers welcomed him.
Starting in lane four, Bolt was incredibly slow to react out of the blocks, the 100 and 200m world record holder behind Coleman in the lane outside from the off.
How Twitter reacted:
The crowd, on their feet, roared, and so Bolt responded as he has so many times before.
After 50 metres, he moved into his famed "drive phase", head coming slowly up as part of the process that unleashes the full power from his long legs. But it was not quite enough.
Teeth gritted and eyes glued on the big screen of the Trevor Brooking Stand, Bolt streaked through the finish line but any fairytale individual finish to a startling career was dashed by Gatlin and young pretender Coleman.
For the IAAF, could there have been a worse outcome?
Russia remains banned from international competition over doping and now their prized athlete, destined for some kind of future ambassadorial role within the body, bows out beaten by a two-time, largely unrepentant drugs cheat.