Lee Rosenthal, a district judge, cited a motion filed by the US Justice Department in which the government said that allowing the suit to proceed would be "incompatible with the United States' foreign policy interests".
"After a suggestion of immunity is filed, it is the court's duty to surrender jurisdiction," Rosenthal wrote in the ruling from the US District Court in Houston.
Joseph Ratzinger - Benedict's former name - is named as a defendant in the civil lawsuit, accused of conspiring with the Archdiocese of Galveston-Houston and some of its officials to cover up the abuse of three boys during the mid-1990s.
The suit is seeking unspecified monetary damages.
The three boys, identified in court documents as John Does I, II and III, allege that Juan Carlos Patino-Arango, a Colombian-born seminarian on assignment at St Francis de Sales church in Houston, molested them during counselling sessions in the church in the mid-1990s.
Patino-Arango has been indicted in a criminal case by a grand jury in Harris County, Texas, and is a fugitive from justice, the lawsuit says.
Daniel Shea, the lawyer for one of the alleged victims, argued in the lawsuit that letter Ratzinger wrote to bishops around the world on 18 May 2001 was evidence that he was involved in a conspiracy to hide Patino-Arango's crimes and to help him escape prosecution.
The letter, written when Ratzinger was still prefect of the Congregation for the Doctrine of the Faith, explains that "grave" crimes such as the sexual abuse of minors would be handled by his congregation and that the proceedings of church tribunals handling the cases were subject to "pontifical secret".
Shea, who is no longer representing the plaintiff but is counsel to the lead lawyer in the case, said on Thursday that Rosenthal's ruling was a setback for the victims and said lawyers were considering an appeal.
"I think it's a setback for the American people that the administration ever gave the Vatican diplomatic immunity to begin with, and that it's using that to shield them," he