Gordon Gould, who has battled a quarter century for recognition as inventor of the laser, won an important court victory this week when a federal judge ordered that Gould be issued a fundamental patent for gas discharge lasers that are widely used in supermarket check-out devices and other optical scanners.

The decision Thursday by U.S. District Judge Thomas A. Flannery sparked a surge in the stock of Patlex Corp., a New Jersey firm that has a 64 percent interest in Gould's patents.

In over-the-counter trading, Patlex stock closed yesterday at $10.25, up from $5, on a volume of 214,100 shares. Patlex was the steepest gainer on the Nasdaq yesterday.

Gould, 65, who recently moved to rural Kinsale, Va., from Great Falls, hailed the ruling as an "important victory." He first applied for the patent in 1959.

"The wheels of justice grind very slowly," Gould said.

"Now I think it's going to have the effect of turning people's psychology around, especially of the big companies that have been trying to pretend I didn't exist. . . . It doesn't mean they'll automatically pay up," he said. "But it will make all the litigation much quicker and easier."

The U.S. Patents and Trademarks Office had rejected Gould's application, ruling that it did not provide sufficient detail on how to make and use the invention.

Later, the Board of Patent Appeals added that Gould had submitted only "obvious" information on the properties of light beams that was not patentable.

In his 45-page opinion, Flannery found repeatedly that the Patent Office had been "mistaken."

He said Gould's patent application "contains a written description of the claimed invention . . . in such full, clear, concise, and exact terms as to enable any person skilled in the art to which it pertains . . . to make and use the same."

The ruling is based on a six-day trial last January and February at which Gould's key witness was Peter Franken, director of the optical science center at the University of Arizona and former president of the Optical Society of America. Flannery said that Franken's testimony was "more impressive" than the conflicting testimony presented by experts for the Patent Office.

Yesterday, Oscar Mastin, a public information officer for the Patent Office, said no decision had been made on whether to appeal Flannery's decision.

Three years ago, Flannery dismissed Gould's suit without a trial, but that decision was reversed by the U.S. Court of Appeals.

Gould estimated yesterday that the patent involved in the ruling covers about 60 percent of the lasers manufactured in the United States, with an annual value of about $300 million.

According to a statement by Patlex, the products that use them include laser disc recording and playback machines and a wide variety of scientific and industrial equipment. The lasers also have significant medical uses, including eye surgery.

Gould said they are a key element in President Reagan's Strategic Defense Initiative, sometimes labelled "Star Wars."

Patent royalties typically are about 5 percent of sales.

For the past 10 years, until he retired several months ago, Gould was vice president of Optelecom, an optical telecommunications firm in Gaithersburg.