The normally speedy Williams made a series of unforced errors and double faulted five times before Svitolina took the top-ranked Williams 6-4, 6-3.
The stunning loss was the second for Williams in Rio. Williams and her sister, Venus, on Sunday lost the Olympic doubles tournament for the first time.
The disappointing loss caps what had been a record-breaking summer for Williams, who won her 22nd singles Grand Slam title last month at Wimbeldon, tying Steffi Graf’s Grand Slam record.
For more Olympics coverage: