The mayors of a host of cities from New York to Oregon said here today they would join with labor, business and county leaders in an "onslaught" against Congress to save the $4.6 billion federal revenue-sharing program due to expire this year.

Calling the elimination of the program "Rambonomics," New York Mayor Edward I. Koch declared "war against those who insist on balancing the federal budget by blowing away local government and the millions of Americans who depend on its services."

President Reagan has called for abolishing revenue sharing and Congress in its recent budget resolution decided not to reauthorize the program. Mayors today acknowledged they face an uphill fight in trying to revive the program in the current budget-cutting climate.

Opponents of the program, which distributes money to 39,000 localities, contend many cities and towns have surpluses and do not need revenue sharing, which adds to the federal deficit. The mayors and county officials, however, said eliminating the funds will force them to raise regressive property and sales taxes.

"Washington: don't balance your budget on the backs of America's cities, counties, towns and villages," said New Orleans Mayor Ernest (Dutch) Morial, president of the U.S. Conference of Mayors. "You'll break our backs and the essential services upon which all Americans depend."

Boston Mayor Raymond Flynn said the $18 million Boston receives in revenue sharing goes to pay for police. Because the city can't raise taxes under the Proposition 2 1/2 tax law, he said, "I'll have to choose between programs for feeding the malnourished, for sustaining the lives of low birth-weight babies and for police patrols on the streets."

In New York, Koch this week proposed an austere budget with no increases in city services and some tax increases, citing the prospective loss of $270 million in revenue sharing. Since 1978, cuts in federal funds have meant federal support of the city's budget has dropped from 20 percent to 14 percent.

National Association of Counties President Robert Aldemeyer said that, without revenue-sharing funds, it will be hard for Kenton, Ky., where he is a local official, to upgrade its jail to federal standards.

According to figures released by the National Coalition to Save General Revenue Sharing, Maryland localities would lose $87 million, or 6.6 percent of the amount they raise in local taxes; Virginia would lose $12 million or 12.8 percent of the local tax total, and the District of Columbia would lose $17 million.