President Reagan, seeking to establish that he opposes racial discrimination, partially reversed his administration's four-day-old position and announced yesterday that he will submit legislation to Congress to prohibit tax exemptions for schools that discriminate against blacks. Until Congress acts, however, the administration will go ahead and grant such exemptions.

Reagan concurred in the decision announced last Friday by Treasury and Justice Department officials to revoke the 12-year-old government policy of denying tax exemptions to schools that the Internal Revenue Service found practice racial discrimination, White House communications director David Gergen said yesterday.

But the president apparently did not anticipate the barrage of criticism that followed that decision, and Gergen said he decided either late Monday or yesterday to submit legislation. Justice and Treasury officials said Friday that the administration had no intention of pressing the issue with Congress by drawing up legislation of its own. That position is now reversed.

The confusion at the White House over the school issue came from a collision of concern over racial discrimination and Reagan's long-held opposition to administrative agencies wielding powers that he thinks should be exercised by Congress.

It left the administration deciding Friday that the second consideration was more important than opposing racial discrimination.

Gergen portrayed Reagan's decision to submit legislation as an action that restores balance by "reestablishing" opposition to racial discrimination. However, it leaves in place tax exemptions for racist schools until Congress acts. Gergen said the president expects such action "promptly," but he could provide no timetable even for when the president's bill will be sent to Congress.

"I am unalterably opposed to racial discrimination in any form. I would not knowingly contribute to any organization that supports racial discrimination. My record and the record of the administration are clear on this point," Reagan said in a statement he read to a Cabinet meeting yesterday afternoon and that was later released to reporters.

"I am also opposed to administrative agencies exercising powers that the Constitution assigns to the Congress," Reagan said. "Such agencies, no matter how well-intentioned, cannot be allowed to govern by administrative fiat. That was the sole basis of the decision announced by the Treasury Department last Friday. I regret that there has been a misunderstanding of the purpose of the decision."

The president did not address, and Gergen could not explain why, he had not allowed the IRS' authority to deny tax exemptions to remain in effect pending the passage of legislation, or why Reagan waited four days, while criticism mounted, before announcing he would submit legislation.

Nor would Gergen state that the president wants his legislation to be as broad-gauged as the IRS regulations he has wiped out. "We'll have to wait and see," Gergen told reporters several times, saying he could not speak to individual cases.

"These are thorny issues, but for that very reason they should be resolved in the legislature," Gergen said.

Reagan held two hurriedly arranged meetings with black members of his administration before announcing his decision. The blacks--Secretary of Housing and Urban Development Samuel R. Pierce Jr., Melvin L. Bradley of the White House Office of Policy Development and Thaddeus Garrett of Vice President Bush's staff--made what Gergen called "eloquent" arguments against Friday's decision. Gergen said he did not know whether the president reached his new decision before or after talking to the three blacks.

Pierce described Reagan as "hurt" by charges that lifting the IRS regulations was racially motivated. He said Reagan told him: "Look, I don't want to discriminate, but I don't feel that the IRS should have broad regulatory powers." Pierce said that sending a bill to Congress to reinstate the ban was "a good idea."

Reagan and his counselor, Edwin Meese III, and White House deputy chief of staff Michael K. Deaver initiated the meetings with the blacks, Gergen said.

Reagan met later with Sens. Strom Thurmond (R-S.C.), the chairman of the Judiciary Committee, Robert J. Dole (R-Kan.) and Charles McC. Mathias Jr. (R-Md.), and Rep. Carroll A. Campbell Jr. (R-S.C.). Gergen said they all agreed that "legislation was appropriate." He declined to say whether they agreed how far-reaching the legislation should be.

Although Gergen told reporters that the initial decision to allow tax exemptions for schools that discriminate was made on the unanimous recommendation of Justice and Treasury officials plus the advice of some of Reagan's aides, Gergen indicated that no one raised concern over the effect of granting the exemptions.

Last Friday, Treasury and Justice officials were deliberately vague about what the White House involvement in the decision had been. "The decision was checked with the White House," one said, but he did not know if it had been presented to the president. He said the White House "acquiesced" in the decision.

"The White House gave no indication of what its position was until the decision had been made at the Treasury Department and communicated to the White House," this official said. "Now, you will certainly find as you make inquiries that people at the White House were aware of this issue. . . . There may have been thoughts at the White House about various things. These thoughts were not communicated to anyone in a policy-making position at the Treasury Department until after the decision had been made."

Tax exemptions can be a matter of survival for schools and in President Nixon's first term it was decided that denying the tax breaks was one of the most powerful weapons the government had to prevent the proliferation of white-only private schools in reaction to federal desegregation efforts.

Two religious schools, Bob Jones University in South Carolina and Goldsboro Christian Schools Inc. in North Carolina, challenged the policy in court. Both are described by the government as "blatantly discriminatory." The government defeated both schools in appeals courts and last fall filed a brief with the Supreme Court asking that the lower court decisions be reviewed and upheld so that the IRS would have greater authority to enforce the policy.

In light of the change of policy last Friday, the Supreme Court was asked to declare the Bob Jones and Goldsboro cases moot.

A number of civil rights organizations have predicted that there would be a substantial number of new tax exemptions. Southern Regional Council executive director Steve Suitts said it is believed there are about 750,000 students in segregated private schools in southern states.

The prospects for passage of a bill to replace the IRS regulations were not clear yesterday. A bill would be expected to have little problem in the House. "If the president recommends it, it will go through Congress," said Rep. James R. Jones (D-Okla.).

In the Senate it could face a filibuster, although there was no threat of one yesterday. Dole, chairman of the Senate Finance Committee, said there would be quick hearings.