Gatlin, playing down his role of "villain" following two doping suspensions, cruised to victory in his heat with a wind-assisted time of 9.83 seconds.
Defending champion Bolt, who turned 29 on Friday, followed that by winning the seventh and final heat in 9.96 running into a slight headwind at the same venue where he won three Olympic golds in 2008.
The Jamaican will line up in Sunday's opening semifinal against Gatlin's young U.S. teammate Trayvon Bromell, who won heat four in 9.91 -- the fastest of the "legal" times not helped by wind.
"It wasn't as great as I wanted it to be, but I wasn't expecting the first one to be great," Bolt said after only his second sub-10s run in an injury-hit year so far.
"I wasn't trying to run fast. I wanted to save as much energy as possible. I am in wonderful shape."
Gatlin, who has dominated sprinting since his return in 2014 after a ban for steroid use, was also running within himself as he clocked 0.11s slower than his season's best.
"Bolt did the same thing in London 2012," said the 2005 world champion. "He raced slower in the first round, picked it up in the semis and crushed it in the final."
In the second of three semifinals, Gatlin will face compatriot Mike Rodgers -- another American to have served a doping ban -- after the 30-year-old was second behind Bolt in 9.97.
Their teammate Tyson Gay -- who failed a drug test ahead of the 2013 world championships -- is in the final semi after winning heat two in 10.11.
The 2007 world champion will be up against Jamaica's former world record-holder Asafa Powell, who also missed the 2013 event after testing positive for a banned stimulant.
New IAAF president Sebastian Coe
said during his campaign he would feel "queasy" if Gatlin beats Bolt in Sunday's final due to the American's history of offenses.
Another athlete under the spotlight is Olympic middle-distance champion Mo Farah, who was caught up in allegations that his American coach Alberto Salazar had doped the runners he works with. Salazar has denied the claims and produced a lengthy rebuttal to them.
While there was no suggestion this included the British star -- though his U.S. rival Galen Rupp was implicated in a report by the BBC and ProPublica -- Farah has been at pains to clear his name.
On Saturday the 32-year-old defended his 10,000 meters title, adding to his 2012 Olympic crown, and will now seek to repeat his double from the previous worlds by retaining his 5,000m gold.
His time of 27 minutes and 1.13 seconds was 0.04 faster than the Olympic record set at the same Bird's Nest stadium by Kenenisa Bekele in 2008. The Ethiopian still holds the world championship record of 26:46.31 set in 2009, and the overall best of 26:17.53.
World cross-country champion Geoffrey Kamworor was second in 27:01.76, with fellow Kenya Paul Tanui claiming bronze in 27:02.83, while Farah's training partner Rupp was fifth (27:08.91).
"This is for everyone that supported me and believed in me," Farah said. "I genuinely enjoy running and love what I do. It's great to win here tonight and to be able to back it up year after year is pretty incredible.
"It means a lot because there's sometimes certain things that happen out of your control. You can only control what you do, and I am controlling what I am doing and winning races."
Meanwhile, 19-year-old Ghirmay Ghebreslassie became the youngest winner of the men's marathon and the first Eritrean athlete to win a gold medal.
He came home in two hours, 12 minutes and 28 seconds, ahead of Ethiopia's Yemane Tsegay (2:13.08) and Ugandan Munyo Mutai (2:13.30).
World record-holder Dennis Kimetto and fellow Kenyan Wilson Kipsang -- who previously held the best time -- did not finish the race.
"My parents wanted me to be a great university student, but I wanted to become a good athlete," said Ghebreslassie, just the second Eritrean athlete to win a world championships medal of any kind.
"When they saw that I had the potential to become a good runner, they started supporting me. Today's victory will be a great surprise for them. I do not have words to explain what I feel today.
"I realized that I could win the race at 34 km when I decided to leave the rest of the group. This race showed me that if you work hard, you can achieve what you aim for."
Saturday's other gold medal was won by Germany's Christina Schwanitz in the women's shot put.
In the absence of four-time champion Valerie Adams, who is still recovering from injury, the 2013 runner-up triumphed over home hope Gong Lijiao while American Michelle Carter was third.