Benedict J. Gallo, a GS-12 Army chemist in Natick, Mass., celebrated the seventh day of the seventh month of 1977 with a flair -- he isolated a mutant strain of fungus that can help convert waste paper into food and fuel.

Two months ago, the microorganism joined the list of 30,000 patents that the federal government owns -- about 3 percent of all inventions that have been patented.

Gallo's fungus, and other government inventions, are likely to achieve their marketing potential only if they are developed by private industry. However, some critics charge this development will decline because the Reagan administration is phasing out the Commerce Department office responsible for bringing together federal inventions and companies that would like to market them.

The government already has taken steps to get out of the invention business. Under a law that took effect July 1, nonprofit institutions or small businesses that invent something while under government contract may retain the patent rights if they wish. Legislation is being drafted that would extend that privilege to larger companies, too.

If a patent license is marketed successfully, and the government begins to receive royalties, the federal bureaucrat who invented the product or process receives about 15 percent of the royalties as an incentive to invent more.

But that may change if the administration proceeds with plans to phase out Commerce's Office of Government Inventions and Patents over the next two years.

Theoretically, each agency will still be able to market licenses for its employes' inventions. But critics say the agencies lack the expertise and budgets to do the job right. Moreover, they say, agencies marketing their own inventions tend to wait for businesses to come to them rather than publicizing them aggressively.

Since it was started five years ago, the Commerce office, which has a $750,000-a-year budget, has licensed 50 inventions, 15 in the past seven months. Last year it received $50,000 in license fees and royalties, and since it usually takes several years for a licensed invention to be marketed and start earning royalties, observers say those figures could grow substantially over the next few years.

Among the inventions the office has marketed recently are a vaccine against hepatitis (to a pharmaceutical company) and a detector to alert airplane pilots when they are approaching invisible turbulence (to Bendix Corp.).

The office is "just beginning to bear fruit," said Richard Onanion, editor and publisher of Invention Management, a trade newsletter based in Arlington, Mass. "These guys in the budget office are totally unfamiliar with technology transfer. Their logic is totally perverse."

But Philip Goodman, a director in the Commerce Department's Office of Productivity, Technology and Innovation, said the administration believes the office is unnecessary because the job can be done by the individual agencies.

The liaison office, located in Springfield, Va., begins the marketing process by searching for patents that might be of interest to industry -- about one in 10, said Douglas J. Campion, program coordinator.

Then it advertises the invention in the Federal Register and trade publications, offering to license it to companies for commercial development. The office has compiled lists of contacts in interested companies all over the country, so that word-processing machines can spew out personal letters to them describing any new patents in their area. Sometimes the letters are followed with telephone calls.

Campion's office also publishes a weekly newsletter, Government Inventions for Licensing, for 300 subscribers interested in new inventions.

When necessary, the office also secures patents for the invention in other countries so that if the invention is developed abroad, the United States will receive royalties. Campion said foreign patent applications are filed for only about 2 percent of government patents, and usually only in European industrialized countries. The United States has applied for two patents in the Soviet Union, he said.