The world number one looked distressed through large parts of her semifinal on a hot Court Philippe Chatrier, wrapping herself in ice towels
between changeovers and walking wearily around the arena.
But remarkably she reeled off the last ten games to reach Saturday's final where she will face Lucie Safarova for a third Roland Garros title and 20th career major.
“I have never felt so sick,” 33-year-old Williams told US broadcaster ESPN.
“I caught the flu after my third round match and have been struggling ever since,” she said.
“I never thought I could win and I didn't want to go to a third set,” Williams said.
“But I thought that if I was going to lose I had better go for winners,” she said.
“I was so tired and the next thing I knew I was in a third set — I don't know what happened.”
On her prospects for Saturday's final, she added: “I just hope I can get better from here.”
Swiss media criticized Williams for putting on an act and being unsportsmanlike.
The 25-year-old Bacsinszky, who was a break to the good in the second set before seeing her opponent sweep the last ten games, said she tried not to let Williams's problems affect her.
“I have no idea how fit she was, I tried to forget that and just push myself,” said the Swiss player who was working in hotels and restaurants just two years ago during an injury-enforced absence from the sport.
“It's only a tennis match,” said the native of Belmont-sur-Lausanne in the canton of Vaud.
“She was better and pulled out a great match,” she said.
“Whether she was struggling or not struggling, I was just focussed on what I was doing.”
Bacsinszky was only the fourth Swiss woman to reach the semifinals of a Grand Slam tournament.
The other three Swiss women to accomplish this were Martina Hingis (19 times), Manuela Maleeva-Fragnière (twice) and Patty Schnyder (once).
She joined another native of Vaud — Stan Wawrinka — who qualified for the men's semifinals of the French Open after beating compatriot Roger Federer in the quarterfinals.