The U.S. Court of Appeals ruled yesterday that the federal government can carry out its plan to close a dilapidated shelter for the homeless operated by the Community for Creative Non-Violence in downtown Washington.

But CCNV leader Mitch Snyder threatened last night to resist eviction from the building at 425 Second St. NW, saying, "There is almost certain to be a physical confrontation" between residents and any federal law enforcement authorities who attempt to enforce the court order.

A three-judge Appeals Court panel, ruling that the government had provided "adequate alternatives" by establishing new shelters last month in Anacostia and Shaw, said the shelter could be closed at noon tomorrow.

Snyder said CCNV probably would not appeal the decision. "The decision is now back where it has always been," he said, "with our God."

Assistant U.S. attorney Royce C. Lamberth said "no trespassing" signs would be posted at the Second Street shelter tomorrow, but he said no announcement would be made of "further law enforcement action.

"All of the occupants of the shelter will be given ample opportunity to leave voluntarily," he said.

In a 29-page opinion, the Appeals Court judges upheld an August decision by U.S. District Judge Charles R. Richey that the shelter could be closed after alternative arrangements were made for those using it.

The closing had been delayed several times since then, most recently by an Appeals Court stay issued Nov. 20, which the judges said would be lifted tomorrow.

CCNV said its shelter had 800 beds but the Appeals Court cited a U.S. Public Health Service report that the building, a World War II "temporary" that formerly was occupied by Federal City College, is "adequate to house 550-650 individuals."

In mid-November, using $3.7 million in federal grants, the D.C. Coalition for the Homeless opened a 600-bed shelter for men in Anacostia Park and a 60-bed shelter for women on Florida Avenue NW.

The court said these were "superior" to the CCNV shelter, about which it said there was "well-documented evidence of deplorable conditions."

The coalition plans to open another 25-bed shelter for women within a week.

On Monday night, the Second Street shelter housed 646 persons, including 86 women and five young children, according to Snyder. Coaltion president Elisabeth Huguenin said her group's shelters had 375 men and 36 women the same night.

Under the court ruling, Lamberth said, the government is not required to open additional shelters because it had provided an adequate alternative for at least the same number of people as at the Second Street facility.

The Appeals Court noted that the District government has "repeatedly ignored calls for assistance" either in operating the Second Street shelter or finding alternatives to it.

Last week Audrey Rowe, D.C. commissioner of social services, said the city was considering the possibility of expanding District-run shelters if the CCNV facility is closed.

City officials could not be reached for comment on the issue yesterday.

When the Anacostia shelter opened last month, residents of the old shelter chanted "Hell no, we won't go," and most refused to board vans that came to pick them up.

"We are going to fight for our home," Snyder said last night. "We are not going to take 650 people out into the streets and see some of them die. I just don't believe the government will throw 650 onto the streets at the start of the Christmas season. And we don't intend to make it any easier for them."

"If I were the administration, I would think twice before they send their shock troops in here . . . ," he said. "We intend to make it as politically costly for the administration as we can."

In its ruling yesterday, the Appeals Court said the U.S. Department of Health and Human Services had properly decided to close the shelter after failing to reach an agreement with CCNV on the extent of repairs needed to fulfill a pledge by President Reagan to transform it into a "model" facility.

Reagan's promise was made shortly before the 1984 election to end a 51-day fast by Snyder.

But the judges said the "alleged commitment" could not be enforced by the courts because it "was not tied to any specific statute or program."

Chief Judge Spottswood W. Robinson III and Judge Patricia M. Wald added that HHS had given adequate justification for rescinding its decision last May to authorize $2.7 million for renovations after CCNV said it would block federal workers from starting the project.

The CCNV presented a more elaborate plan, which the government said would cost $10 million, and filed suit to force the extensive renovations.

Judge Robert H. Bork concurred in the decision, but said Richey and the Appeals Court should have simply dismissed the CCNV suit because there was no legal standard for deciding the issue.