The American track star said Sunday he was notified Friday by the US Anti-Doping Agency of his positive A sample result. His B sample has not yet been tested.
"I don't have a sabotage story... I basically put my trust in someone and was let down," Gay said.
"I made a mistake. I am pulling out of Monaco (this week's Diamond League meeting) and the World Championships.
Reports out of Jamaica, where the in-race testing occurred, say five Jamaican athletes have also tested positive, including two Olympic gold medalists.
Sources indicate a dietary supplement at training camp may have been the culprit, and the athletes are now considering legal action against the supplier.
Gay holds the second fastest 100-meter sprint time at 9.69 seconds, bettered only by Usain Bolt. He holds the three fastest times this year, including a 9.86 to win the Jamaica Invitational in May and a 9.75 at the US World Championship trials in June.
He was the 2007 world champion and had suffered injuries that kept him out of competition for several years, but was able to return to the Olympic track in London in 2012, where he came in fourth.
Swim Week Miami Beach 2014 [PHOTOS]