The D.C. Court of Appeals yesterday gave a young Washington girl a third chance to sue the District government for damages she said she suffered in 1974 after she was raped three times by a janitor at a city elementary school where she was a 10-year-old student.

A D.C. Superior Court jury originally awarded the girl $640,000 after a trial in 1976. But the award was thrown out and a new trial ordered after Judge James A. Belson ruled that the jury's decision was based more on "emotion" than on the weight of the evidence in the case.

In June 1977, after a second trial before Judge George H. Goodrich, another jury awarded the girl $173,000 in damages against the janitor accused of assaulting her. That jury however cleared the District government and its school employes of negligence in connection with the incident.

Yesterday, the three-judge appeals panel ruled that Goodrich had incorrectly instructed the jury when he explained the court rules for deciding whether the District and its employees could be held responsible for assaults. w

The girl and her mother had filed suit against the District government, the school principal at the time, a guidance counselor, the girl's teacher and the janitor. The family's attorney, Samuel M. Shapiro, had argued that the District, through its school system, was responsible for protecting students from such assaults.

Before the second jury began its deliberations, Goodrich instructed members that they had to find among other things, that the conduct of the school and its employes was a "substantial factor" resulting in the girl's injuries.

The girl's family argued, and the appeals court yesterday agreed, that such a standard is not the law in the District of Columbia. The court said the instruction was both erroneous and prejudicial to the girl's case.

Associate Judge John W. Kern III, writing for the appeals court, said that Goodrich's instruction put a greater burden of proof on the family than is normally required in a negligence case here. Kern was joined in his opinion by Associate Judges Catherine B. Kelly and Julia Cooper Mack.

In the same decision, the appeals court upheld Judge Belson's earlier findings that the first jury's award of $640,000 was excessive.

The second jury's judgment against the janitor, Ronald G. Harrison, was not challenged in the same appeals court. Harrison was sentenced in 1975 to serve three to nine years for carnal knowledge. The girl, a fourth-grade student, was assaulted in a second-floor restroom at Bunker Hill Elementary School in April and May of 1974. The child did not report the assaults immediately, investigators said, because she was frightened.