When the Reagan administration came to town, vowing to unfetter industry from crippling regulations, many environmental activists expected a compliant Congress to undo their victories of the previous decade.

"A year and a half ago we thought we were going to get steamrollered," said John McComb, director of the Sierra Club's office here.

But environmentalists last week put together an impressive string of victories on some major pieces of legislation, suggesting that the fight will be a far closer match than some had once expected:

* In a defeat for Interior Secretary James G. Watt, the House voted by a far wider margin than expected, 340 to 58, to ban oil and gas exploration in the nation's wilderness areas.

* Despite intense lobbying by the chemical industry, the House voted 352 to 56 for a two-year extension of the basic federal pesticide control law after defeating a number of amendments that industry had succeeded in getting through the House Agriculture Committee.

* The House Energy and Commerce Committee, which has been battling for nearly two years over a rewrite and extension of the Clean Air Act, the nation's major air pollution law, rejected an industry-backed amendment on hazardous airborne pollutants in a vote that signals the likely death of the pending rewrite, which environmentalists have dubbed a "dirty air act."

Meanwhile, the Senate Environment and Public Works Committee, over the strong objections of industry and the Reagan administration, is expected this week to approve its own version of the Clean Air Act, with an addition to existing law aimed at controlling acid rain.

And with budget pressures stronger than ever, environmental groups believe they may finally have the votes to kill federal funding for the Clinch River fast breeder reactor and the Tennessee-Tombigbee Waterway, two longtime targets of environmentalists, when a vote comes up next month.

"We have the champagne on ice," said Renee Parsons of Friends of the Earth, which this year organized a coalition of taxpayer and environmental groups against Clinch River.

Observers attributed last week's votes in large part to election-year jitters, with polls showing that the pro-environment "green vote" could play an important role in this year's elections.

"Everything that most everyone is doing now . . . is directly related to what's going to happen in November," said Rep. Marc L. Marks (R-Pa.), who provided a crucial vote in the Clean Air Act battle.

"More of our members are hearing from people back home who are interested in the clean air proposition than they probably have ever heard from before, and it being so close to Election Day Nov. 2) they are finally listening," Marks, who is not seeking reelection, added.

Members of Congress and environmentalists alike point to polls showing voter concern over the environment. In a March survey by Louis Harris, 13 percent of voters said they feel so strongly about environmental issues that it could determine their vote. A Harris Survey released last week found that voters supported strict enforcement of clean air and water laws by 85 to 10 percent, compared with 83 to 14 percent in February.

"These guys don't want to go home and explain how they voted to gut a pesticide bill or a clean air bill, or voted to open wilderness areas to oil and gas development," said Steven Pearlman, political policy director of the League of Conservation Voters. "It's just not something you want your opponent to get hold of."

The Sierra Club's McComb said, "I don't think that anybody would claim that the average voter is going to make a decision on environmental issues. But in an election where a few hundred or a few thousand votes is going to decide the skins . . . any savvy congressman is not likely to just ignore these people right off."

Part of the environmental upsurge appears to be a home-grown, spontaneous reaction to a perceived hostility to environmental concerns on the part of the Reagan administration.

"We can always tell when 30 letters come in and say the same thing" that they have been orchestrated by a lobby group, Marks said. "We're not having much of that."

But part of the credit for last week's success also appears due to increased sophistication on the part of the environmental groups, which, over the past decade, have become effective political operators, armed with computerized data banks and political action committees, able to compete with industry lobbyists in forging coalitions and twisting arms.

Even their opponents give the environmentalists credit. "They're a very effective lobby," said Interior Department spokesman Douglas Baldwin. "Nothing surprised this administration more than the easy access the environmentalists have to the news media, cultivated over the years, with all the right buzzwords."

There is "no doubt" that lobbying by environmentalists turned the tide on the Clean Air Act, said William Megonnell of the Edison Electric Institute, a trade association of investor-owned utilities.

"The thing that they do that we have not yet learned to do is get out an announcement to the littlest paper in every congressman's district every time there's a vote they don't like," Megonnell said. "They've got the grass-roots lobby really worked up."

On the wilderness bill, environmental groups joined forces with hunting and fishing aficionados to bring a number of conservative western Republicans onto the bandwagon. Environmental groups fighting to change the pesticide bill as it came out of committee enlisted the aid of states seeking to maintain their own authority to impose controls. And environmentalists teamed up with such groups as the American Lung Association, the United Steelworkers union and the League of Women Voters to defend against efforts to weaken the Clean Air Act.

"These people are not environmentalists, but they're tigers on clean air," said Bob Rose of the Clean Air Coalition. "They are out there at all the teas talking this up."

Environmental groups have also begun to take part in election campaigns, making certain that lawmakers with a sympathetic ear for environmental concerns get to Washington in the first place.

"They're recognizing that you can't do a very effective job of influencing legislation and appropriations and priorities in Congress if you don't have members who have a clear understanding of the real issues at stake," Jay Feldman of the National Coalition against the Misuse of Pesticides said.

Four environmental groups -- the Sierra Club, Environmental Action, the Solar Lobby, and Friends of the Earth -- have set up political action committees, some of them just since the 1980 election, and have joined the League of Conservation Voters, a bipartisan group formed in 1971, in a $2 million campaign to raise money and recruit volunteers for candidates on their side.

The League of Conservation Voters, for instance, has targeted 10 congressional districts for the upcoming election, sending volunteers door to door to talk to voters about candidates' stands on environmental issues. The league also has written opponents of candidates with poor environmental voting records, telling them that "the environment can be a decisive issue in your campaign" and urging them "to press your opponent" on environmental issues.

Since environmentalists are clearly unable to outspend industry, "the key role we have to play is to let people know that if they vote wrong their constituents are going to know about it," political director Pearlman said. "When you've got 85 percent of the people who support you, the trick is to translate that incredibly wide support into votes."

Leland E. Modesitt, director of the Environmental Protection Agency's legislative office, said that last week's votes "back up the polls in saying people are very leery of changes in environmental legislation." Industry groups that expected to dismantle anti-pollution laws were over optimistic, Modesitt said. "It was probably a naive prediction to think that . . . the environmental movement was going to lie down and let it happen," he said.

But Interior spokesman Baldwin cautioned against reading too much into last week's vote on the wilderness bill. While the Interior Department expects "a continuing series of disagreements with some special interest groups," Baldwin said, the wilderness issue is "sufficiently unique" and carries such "special emotionalism" that it "portends nothing for the future in terms of issues versus the environmentalists."

Faced with enormous bipartisan support for the wilderness measure, Watt and the White House took no position on the bill, leaving open the question of what would have happened had the full force of the administration been brought to bear against the environmentalists' position.

"Either Reagan has put environmental issues as a lower priority or his administration has chosen to avoid really mixing it up on the environment," Rose of the Clean Air Coalition said. "I'm not sure whether this has been a genuine test of his ultimate strength on environmental issues."