Gardner, 31, faces life in prison without parole for killing 14-year-old Amber Dubois and 17-year-old Chelsea King.
He also pleaded guilty to attempting to rape another woman who was jogging in San Diego last year.
Gardner, wearing a dark blue jail jumpsuit with his shackled arms hanging at his sides, said nothing but "yes" repeatedly as the judge asked him for his pleas.
Amber vanished in February 2009, and the investigation produced few solid leads until Chelsea disappeared Feb. 25 during an afternoon run in a San Diego park about 10 miles south of the site where Amber vanished.
Gardner was arrested three days after Chelsea disappeared. He initially pleaded not guilty to her killing.
In a surprising turn, Gardner admitted Friday to kidnapping, raping and stabbing Amber. He also admitted dragging Chelsea to a remote area where he raped, strangled and buried her.
Sentencing was set for June 1.
Prosecutor Kristen Spieler told the judge the victims' families agreed to the plea agreement. She was not immediately available for comment after the hearing.
Chelsea's body was discovered March 2 in a shallow lakeside grave after a massive search. Prosecutors said Gardner was linked to the crime by DNA found on Chelsea's clothing.
Amber's bones were discovered March 6 in a rugged, remote area north of San Diego. She vanished with a $200 check to purchase a lamb she was going to raise for Future Farmers of America. The check was never cashed.
Escondido police identified Gardner as a suspect in Amber's death but have been silent on what led them to her remains.
Gardner served five years in prison after pleading guilty in 2000 to molesting a 13-year-old neighbor girl. Records show he later violated parole by moving too close to a school but was allowed to remain free.
Gardner's history of parole violations has led to calls to strengthen California's already stringent laws on sex predators.
Chelsea's parents, Brent and Kelly King, have traveled to Sacramento to announce the introduction of "Chelsea's Law," which would send some child molesters to prison for life after a first conviction and monitor others with tracking technology until they die.