A U.S. District Court judge has given the Occupational Safety and Health Administration 20 days to tighten controls on worker exposure to ethylene oxide, calling its failure to act immediately "a clear error of judgment."

An estimated 140,000 U.S. workers are exposed to the gas, the majority workers in hospitals where it is used to sterilize equipment.

Citing a variety of scientific evidence, including studies showing an increased incidence of leukemia among Swedish factory and hospital workers exposed to the gas at concentrations currently permitted by OSHA, Judge Barrington D. Parker said the agency had abused its discretion by not immediately tightening its standard in response to several petitions.

"The record before the agency presented a solid and certain foundation showing that workers are subjected to grave health dangers from exposure to ethylene oxide at levels within the the currently permissible range," said Parker's opinion, which was dated Jan. 5 and made public yesterday.

Parker's decision marked the first time a court has reversed an OSHA decision not to issue an emergency standard.

By contrast, four of the eight emergency standards published in OSHA's 12-year history have been overturned by the courts as unnecessary or unsubstantiated.

OSHA Administrator Thorne G. Auchter issued a one-sentence statement yesterday saying, "It appears the court is trying to set our regulatory agenda for us." John D. Bates, the Justice Department attorney who handled the case for the agency, said no decision has been made on a possible appeal.

The challenge to OSHA was brought by the American Federation of State, County and Municipal Employes, which represents hospital workers, and by the Nader-founded Health Research Group. Yesterday the latter issued a statement that the judge's decision "sends a clear message to the Reagan administration that it can no longer continue to abandon . . . its legal duty to protect America's workers."

In August, 1981, the health group and AFSCME petitioned the agency for an emergency change making the standard 50 times as stringent as it had been.

In January, 1982, the agency turned down the request and issued a notice that it was reevaluating the current standard. Judge Parker's opinion noted that an average of 2 1/2 years normally elapses between such a notice and a final rule change. Emergency standards take effect immediately, but remain in effect for a maximum of six months while a permanent standard is developed.

Ethylene oxide, which ranks in volume among the top 25 chemicals produced in this country, is also used by the chemical industry in the production of antifreeze and polyester fibers.

However, since it is highly explosive, it is usually used within closed, airtight machinery. While only a tiny fraction of the gas produced is used in hospitals, hospital workers are exposed to far greater amounts of ethylene oxide than workers in other industries, according to the National Institute of Occupational Safety and Health.

The failure to issue an emergency standard, Parker said, was a "clear error of judgment." The scientific evidence, he added, "plainly show s that workers, particularly in health care, are subjected to a grave health hazard when exposed to ethylene oxide at levels in compliance with the current standard.

"Despite the overwhelming administrative record favoring issuance of an emergency temporary standard, OSHA has embarked on the least responsive course short of inaction."

Government attorneys had also argued that since the Environmental Protection Agency regulates the chemical in its pesticide program, OSHA was preempted from changing its own rule, a contention the judge dismissed.