A U.S. District Court judge in San Francisco ruled yesterday that a California company had infringed on laser patents held by their developer, Gordon Gould, vice president of Optelecom, an optical firm in Gaithersburg.

The ruling by Judge Samuel Conti climaxed a legal battle of more than four years in which Gould had sought to prove infringement against several firms that had developed laser products since he received his first patent in 1977.

The decision could mean millions of dollars in royalties for Gould and his partners. Lasers are estimated to be a $1-billion-a-year industry.

Conti ordered General Photonics of Santa Clara to pay the Patlex Co. of Philadelphia--a firm owned by Gould and two other principals--a 5 percent royalty on past infringements and 8 percent on future laser sales.

Gould, reached at his office in Gaithersburg yesterday, said the next step would be to ask several companies accused of infringing on his patent to be licensed by Patlex.

Gould, who developed the laser more than 20 years ago, estimates that he has spent about $600,000 for legal fees and licensing operations.

"The significance of Conti's ruling in our opinion, goes far beyond the numbers involved because this is the first judicial test of the Gould patents," declared Gary Erlbaum, president of Patlex.

Gould owns 20 percent of the company while Patlex and Refac Technology of New York each owns 40 percent.

Erlbaum estimates that a royalty of 5 percent will have to be paid on sales of $2.5 million.

"We had our day in court finally," Erlbaum said. "I think it's safe to say the eyes of the laser light world are on this case."

Erlbaum declined to speculate on whether other companies accused of infringing on the patents will seek licenses. But he added, "It creates an atmosphere where the patent has been tested."

For Gould, a physicist who lives in Northern Virginia, yesterday's ruling climaxes a "tortuous" battle for vindication, Erlbaum said.

Gould developed the laser in 1959 but was unable to obtain a patent until 1977. He was issued another patent two years later. Conti's ruling upheld the validity of those patents.

Gould and his associates filed suit charging infringement in 1978 but had to wait four years before a trial date was set last month.

Two companies decided to apply to Patlex for licenses before the trial began Feb 8. Gould said he "suspects that others will follow suit" now that Conti has issued his ruling in the case.