The state's highest court struck from the November ballot today a referendum seeking to block the Navy from bringing nuclear weapons into New York harbor.

The Appeals Court decision was hailed by local politicians who had lobbied hard for construction of a $300 million home port on Staten Island for the battleship USS Iowa and six other vessels, some of which would carry nuclear weapons.

"For New Yorkers to reject the U.S. Navy would have been to the eternal shame of New York," Mayor Edward I. Koch said. "We would have alienated ourselves from the rest of the country."

The Reagan administration has sought to build support for an expanded fleet by dispersing new ships around the country where port construction and activity would generate jobs. Competition was fierce this year among Gulf Coast cities when the Navy sought a base site there, with Corpus Christi, Tex., emerging the winner after voters approved a bond issue. The nuclear-arms issue barely surfaced in five of the six cities chosen as finalists.

The court decision here came when support for the referendum appeared to be growing. A poll commissioned by home port opponents found that 48 percent of likely voters opposed the port, 37 percent favored it and the rest were undecided. Thomas DeLuca, head of the antinuclear Mobilization for Survival, said the results were similar to those found by a city-commissioned poll that has not been released.

Today, a coalition of religious leaders, including the Rev. William Sloane Coffin of Riverside Church and Episcopalian Bishop Paul Moore, denounced the home port project in a news conference.

"No annihilation without representation," said Dean James Morton of the Cathedral of St. John the Divine.

A cast of celebrities, from Edward Albee to Meryl Streep, was expected at a "cocktail gala" tonight hosted by actors Tony Randall and Susan Sarandon to raise money for the antinuclear opposition at $100 to $250 a head.

While all three major newspapers have endorsed the home port, The New York Times called on the Appeals Court last week to "let the voters have their say" and to decide later whether the referendum was constitutional.

DeLuca, a former college professor, called today's decision "a case of democracy denied. Elected officials who brought suit against the referendum sabotaged the democratic process because it was clear that a majority of New Yorkers oppose nuclear missiles in New York City."

Homeport opponents, represented by the Center for Constitutional Rights, were considering tonight whether to appeal to a federal court. DeLuca said it appeared unlikely.

Two lower courts ruled that the referendum, which would have barred the city from giving land or facilities to the Navy, was unconstitutional because it interfered with national defense. The Appeals Court based its decision on a 1909 state law that gives cities exclusive right to give, sell or lease public land to the federal government.