President Carter, under pressure from the copper industry and western political leaders, yesterday reversed himself and supported a plan to have the government purchase a quarter of a million dollars' worth of copper from the nation's strategic stockpile.

The massive purchase will wipe out 225,000 tons of the 2-million-ton world-wide copper surplus that has sent copper prices sharply downward since 1974 and severely cut into domestic producers' profits.

The president's move is also expected to be particularly popular in five western copper-producing states where more than 5,000 copper workers are unemployed.

A senior White House official said the copper stockpile legislation introduced in Congress yesterday by Rep. Morris K. Udall (D-Ariz.) and Sen. Dennis DeConcini (D-Ariz.) "is both cost effective and consistent with national security policy."

The administration's decision is in line with the government's avowed policy of buying up to 1.3 billion tons of copper in the next 20 years, which was carried over from the Ford administration.

Last year the White House opposed similar legislation offered by Sen. Pete V. Domenici (R-N.M.) that would have exchanged tin from the stockpile for new copper acquisitions. Unlike copper prices, which have fallen in the domestic market from 85 cents a pound in 1974 to about 61.5 cents now, tin prices are at near record-high levels.

The DeConcini-Udall bill calls for selling 45,000 long tons of tin, as well as some tungsten, from the national stockpile administered by the General Services Administration, and using some of the proceeds to purchase up to 225,000 tons of copper.

Udall applauded Carter's move, saying. "It was a very positive step in the direction of mending fences in the west." He met with Carter at the White House last January to appeal to him to aid the copper industry. Udall, along with DeConcini and Domenici, has been working with Vice President Mondale's staff on a compromise to buy copper for the stockpile.

Carter has been accused by some as waging a "war of the west" because of controversial administration stands on sensitive water, energy, and environmental issues that dominate western politics.

Relief for the copper industry was one of the major issues raised by western governors at a meeting with Mondale in Reno during his western goodwill mission on behalf of the president earlire this year.

White House support for a stockpile copper purchase was warmly received by the industry. "We are delighted, it isn't all that we would like, but it is a start," said Ralph Mecham, vice president of Anaconda Co.

Anticipation of the White House shift, according to copper industry executives, drove up the London Metal Exchange price - the benchmark for international copper sales - a halfcent. It closed yesterday at 56.96 cents a pound.

Sen. Gary Hart (D-Colo.), chairman of a key Senate Armed Services' panel on stockpiles, said he favored the administration-backed bill. "What we have is a lot of things coming together," he said after morning hearings on stockpile policy. Hart said he opposed the similar bill offered last year "because it was purely economic and not strategic."

George Munroe, chairman of Phelps Dodge Corp., one of the six largest producers in the $3.5 billion domestic copper industry, said the government purchases would provide a psychological boost to the depressed copper industry, which has been hard-hit by environmental regulations and increasing production from Chile, Zambia, Peru, and Zaire.Foreign producers have continued to increase output in recent years despite the glut in world inventories.

Munroe said the stockpile purchase made sense because it is the proper time for it and "the price is right."

Last month, 12 U.S. copper producers filed a petition with the International Trade Commission asking it to recommend that the Carter administration impose a flat quota on refined copper imports.