"I have been informed by the United States Anti-doping Agency that after a relay race I ran in Kansas City on April 22, I tested positive for 'testosterone or its precursors'," the 100 metres joint world record holder said in a statement.
"I cannot account for these results, because I have never knowingly used any banned substance or authorised anyone else to administer such a substance to me."
"It is unfortunate, but it is true," Gatlin's attorney, Cameron Myler, told Reuters in a telephone call from New York.
The 24-year-old Gatlin, whose B sample test in July also produced an unusually high level of testosterone, faces a lifetime ban from the sport.
The positive test is the second by a major U.S. athlete involving testosterone to be announced in recent days.
Tour de France winner Floyd Landis's team announced earlier this week that he had tested positive for the male sex hormone.
Landis, who has also denied doping, is awaiting his B sample result, which may come out on Monday.
Gatlin, who trains under coach Trevor Graham, was banned for two years after testing positive for an amphetamine in 2001 before joining Graham but he was given early reinstatement by the International Association of Athletics Federations (IAAF).
Myler said Gatlin was in shock when he first learned of the positive Kansas test in mid-June.
Gatlin still decided to compete in the U.S. championships because he did not believe he had done anything wrong, a source said. He successfully defended his 100 metres championship in Indianapolis.
Gatlin, who tied Asafa Powell's 100 metres world record of 9.77 seconds, has not run since then, saying he had a leg injury.
But Myler said the B sample test in July also produced an unusual level of testosterone.
A friend said, "Gatlin had been crying for days."
"Since learning of the positive test, I have been doing everything in my power to findout what caused this to happen," Gatlin said in his statement.
"I have been and will continue to cooperate fully with USADA as it moves forward with the process it has initiated and hope that when all the facts are revealed it will be determined that I have done nothing wrong."
Top U.S. athletics official Craig Masback said: "USA Track & Field is gravely concerned that Justin Gatlin has tested positive for banned substances.
"Justin has been one of the most visible spokespersons for winning with integrity in the sport of track and field, and throughout his career he has made clear his willingness to take responsibility for his actions," Masback said in a statement.
"We hope Justin has not committed a doping offence, and we await the completion of the adjudication process."
Myler said Gatlin would next week submit comments to USADA's Anti-Doping Review Board, which would decide if there was enough evidence to proceed against the athlete.
"If they make such a decision, the athlete has the choice of accepting the finding or appealing, which would involve an arbitration proceeding," she said.
Gatlin's previous positive test for an amphetamine came at the 2001 U.S. junior championships. It was contained in prescription medication he had taken for 10 years to treat a form of attention deficit disorder.
"That experience made me even more vigilant to make certain that I (do) not come into contact with any banned substance for any reason whatsoever, because any additional anti-doping rule offence could mean a lifetime ban from the sport that I love," Gatlin added in his statement on Saturday.
The IAAF gave him early reinstatement from a two-year ban in July 2002 but said a second violation would lead to a life ban.
"Since the positive test at the University of Tennessee, I have been involved with efforts to educate people about the dangers of using drugs and would never do anything to disappoint my fans and supporters," said Gatlin.
"It is simply not consistent with either my character or my confidence in my God-given athletic ability to cheat in any way."