Montgomery was last at 20 metres after stumbling and touching the track with his hands but he recovered to roar back and finish second in 10.15 seconds.
Williams, the world championship bronze medallist, won in 10.11 seconds. Jon Drummond was third in 10.18.
The trio, plus reigning world champion Maurice Greene who had a bye, will represent the U.S. at the world championships in Paris in August.
"I lost the battle but maybe I can still win the war," Montgomery told reporters.
"I fell, touched the track with my hands, got up and came in second. I just closed my eyes and ran." Earlier, Montgomery won his semi-final in 10.27 seconds.
Williams, who finished behind Greene and Montgomery in the 2001 Edmonton world championships, said he hoped to do better in Paris.
"This was one of my best starts today," he said. "I reacted well (to the starter's gun) and made a good transition.
"It means a lot being the American champ. I was kind of hungry."
PHOTO FINISH
Kelli White was first in the women's 100 metres in the fastest time in the world this year, 10.93 seconds, despite a headwind of 1.1 metres
Torri Edwards grabbed second in 11.13 and Gail Devers, the 1992 and 1996 Olympic champion, won a photo finish for third in 11.16 seconds.
"My start was awesome," said the 26-year-old White, who nine years ago survived a knife attack that required more than 300 stitches. "I am excited with how fast I went into this wind."
World indoor champion Dwight Phillips defeated Walter Davis by virtue of a better second effort to win the men's long jump. Both leapt 8.24 metres but Phillips had another jump of 8.21 while Davis fouled out at his only other attempt.
Two other world indoor champions advanced to Saturday's finals.
Tyree Washington ran the fastest 400 metres semi, clocking 45.09 seconds, and David Krummenacker, who is recovering from a hamstring injury, went through in the men's 800 metres.
Legally blind Marla Runyan won the women's 5,000 metres in 15:16.18 and Tim Broe took the men's race in 13:35.23.
Olympic 400 metres hurdles champion Angelo Taylor, who suffered a groin injury in a workout this week, failed to advance past the first round.
He finished fourth in his preliminary in 50.72 seconds, missing the semi-finals by 5/100ths of a second.
The top three finishers in each final at the U.S. trials qualify for the world championships.