After more than 18 months of florid rhetoric by the administration and bitter wrangling on Capitol Hill, the battle over the Clean Air Act has come down to a last-minute game of chicken between the Environmental Protection Agency and its congressional opponents.

The EPA, hoping to extract a less stringent law from the lame-duck Congress, is warning of a major economic and environmental crisis starting at midnight Dec. 31, the deadline for meeting the current law's air quality standards. Nearly one-fifth of the nation's 3,000 counties, in every state except North Dakota, will not be in compliance with the standard for at least one pollutant, according to EPA.

As a result, agency officials say they will be forced to impose a variety of distasteful penalties -- from bans on new construction to plant shutdowns to the cutoff of federal highway funds -- on the states and industries within their borders.

"We will be forced to do a lot of very anti-environmental things," says Kathleen M. Bennett, associate EPA administrator for air quality programs. "We will find ourselves having to suspend grants, which will have negative impacts. An obvious means of air quality improvement is to replace old plants with efficient new ones. With a construction ban, you can't do that."

But state officials, environmentalists and congressional aides say EPA is simply making "scare noises" designed to railroad a rewrite of the controversial act before next year, when a Congress that is potentially more sympathetic to environmental concerns takes office.

"EPA is arguing that the law is so inflexible that they have no discretion to work around these things," said a Senate committee aide. "We think that's an overly rigid construction of the law. If there is an Armageddon, it will be because they have refused to use discretion."

However, even as EPA officials issue dire warnings about the consequences of congressional foot-dragging, the agency has signaled that it intends to be sensitive to the needs of states and some industries in certain cases.

An official with General Motors, for example, says that EPA has indicated its willingness to be flexible in interpreting the stringent high-altitude emission requirements that the auto makers must meet starting with the 1984 models. "We can meet the law given some interpretative flexibility to it," the GM official said.

In a September memorandum to regional administrators, EPA head Anne M. Gorsuch also outlined a plan to rely on the federal courts to use their discretion to avoid shutting down specific industrial polluters that fail to meet the deadline.

Bennett noted that Gorsuch's guidelines call for significant financial penalties on industries that get an extension through the courts, and she said the memo was consistent with EPA's view that it did not have the power to extend the deadlines itself.

"The administrator's memo says we will be moving toward enforcement," she said.

State officials, meanwhile, have been told that EPA plans to ease the standard for total suspended particulates -- the standard that is giving fits to most of the areas that are not expected to meet the Dec. 31 deadline. If the change comes soon, according to Bill Becker, an official with the State and Territorial Air Pollution Program Administrators, "a lot of the nonattainment problems are going to become moot."

The Carter administration's EPA was faced with a similar problem three years ago, when it became clear that more than 100 cities would be unable to meet the deadline for the Clean Air Act's stringent smog standard.

The agency solved that problem for about a dozen cities by altering the standard.

But the Reagan EPA may be backing off that tactic, at least for the time being. Despite EPA's earlier notice to the states, Bennett says the standard cannot be changed in time to excuse the "nonattainment" areas from the end-of-the-year deadline, and "the standard remains in effect until it is changed."

In any case, state officials are counting on the notoriously slow pace of government -- even in the streamlined Reagan EPA--to stave off disaster.

"It is likely that before EPA imposes any sanctions, it will need to analyze a state's data to determine if an area is in compliance or not," noted Becker.

The first data after the deadline would not normally be available to EPA until mid-1983, at which point EPA would have to start the rule-making process on whatever sanctions it decided to impose.

"They can't issue those in less than six months, and that's lightning speed in this town," said a Senate aide. "By the time they've finished the first draft, we'll be finished with the legislative process."

Meanwhile, even administration officials -- who had the Clean Air Act high on their list of lame-duck priorities as recently as two weeks ago -- were saying late last week that "no one has any illusions that the chances are all that good."

Environmentalists and some state officials contend the administration was trying to use the Dec. 31 deadline as a way to "create panic."

"One thing we have to be concerned about is that members of Congress might not believe what Gorsuch is saying, but they might vote against the Clean Air Act and use EPA's argument to shield themselves from constituent criticism," said an official of a national environmental group.