The qualifiers are in action in the semi-finals at 1305 BST on Saturday, with the final two-and-a-half hours later.
Bolt, the world record holder, eased up at the halfway point of his heat to finish ahead of American Darvis Patton, who was second in 10.04.
"It was good - I got a good start and there is lots more left in the tank," Bolt told BBC Sport.
Cannot play media. Sorry, this media is not available in your territory.
Video - Johnson blown away by Bolt
Gay injured his hamstring at the US trials six weeks ago and had not run competitively since.
He also eased up well before the finish line to finish runner-up behind Richard Thompson of Trinidad and Tobago in 10.09 seconds.
"I felt good and relaxed. I just wanted to make it through," Gay said.
Former Olympic champion and BBC summariser Michael Johnson was amazed by the performance of Bolt.
"I've never seen anything like that before. At this stage we're pretty much guaranteed to have a world record in the 100m and Usain is pretty much guaranteed a gold medal," he said.
Jamaica ready for Olympic double
"This year his start has improved and everything is just flawless with him at this point. It's amazing to watch.
"I don't think he will feel the pressure and he is running away so easily from the rest of the field.
"I thought Asafa Powell looked better than he did in the first round and that run will give him confidence going into the semi-finals and finals.
"I don't think he can beat Bolt, but I think he will live up to his expectations and win silver.
"Tyson Gay does not look race-sharp and that is what I was afraid of. That could really come into play in the semi-finals and I don't think he has enough time to recover."
Bookmark with:
What are these?