Treasury Secretary W. Michael Blumenthal announced yesterday that New York City leaders have agreed to set a May 20 deadline for settlement of labor contracts covering some 200,000 municipal employes, as well as the elinination of other roadblocks in the path of federal aid to the city.

Blumenthal's announcement came after an extraordinary meeting with city, state, labor and banking representatives at the Federal Reserve Bank of New York - during which the principal accord was reached after an exchange of secret notes.

In response to these developments in the nation's largest city, Senate Banking Committee Chairman William Proxmire (D-Wis.) dropped his opposition to hearings on a New York City aid bill.

The Proxmire announcement was particularly significant because he has been adamant against taking any action on federal aid proposals until the city and its municipal unions agree on a new three-year labor contract.

Although the House Banking Committee earlier approved federal loan guarantees for up to $2 billion of New York securities - to keep the city solvent after Jone 30 - no floor action in the House was planned until there was some indication the Senate would act.

Yesterday's announcements by Blumenthal and Proxmire cleared the way for a House vote, but the Wisconsin Democrat emphasized that hearings, set to start may 24, are contingent on meeting the May 20 deadline.

The deadline was announced by Blumenthal after a two-hour meeting with the city's Mayor Edward Koch, New York Gov. Hugh Carey and other spokesmen. Reportedly, Blumenthal opened the session with a stern warining that "time is running out," after which Carey wrote out a note and gave it to Koch.

After some consultations with a deputy to Koch and labor officials, a nod was given to Carey and the governor told Blumenthal about the city's agreement. The pact includes a May 20 deadline for a labor accord, passage of state legislation to create a long-term financial monitor and to increase the borrowing authority of the Municipal Assistance Corp., as well as negotiation of a four-year lending agreement for the city with pension funds and financial institutions.

When the meeting broke up, Blumenthal called Proximire. Several labor leaders expressed optimism that they can reach the agreement required within 10 days.

However, the optimism about labor talks was not unanimous. Negotiations have bogged down for weeks because the unions are demanding as a minimum the pact negotiated between New York City and its transit workers.

Koch's new budget allows $610 million for the labor unions involved in current talks but a pact equivalent to that of the transit workers could cost up to $900 million.

Victor Gotbaum, co-chairman of a municipal labor coalition, said he thinks a settlement can be reached by May 20 - one he said "I hope" union members would ratify. Samuel Demilla, head of the policemen's association, also expressed optimism and said he is ready to begin 24-hour-a-day talks.

But Richard Vizzini of the firemen's union said he doesn't "see how the city can come up with a contract by May 20," while promising to "do my best." Both the police and firemen's union broke away from the municipal workers coalition and have been bargaining separately.

New York narrowly averted bankruptcy in 1975 and its workers have gone without pay increases since. In the meantime, the city has been saved from insolvency by a series of seasonal loans that expire at the end of June. Koch said yesterday that "if all parties do what has to be done," the deadline will be met.

Even if the deadline is met, Blumenthal noted yesterday that a "long, difficult process" lies ahead in getting legislation approved by both houses of Congress. Opponents of loan guarantees charge that it would set a precedent for other cities that find it difficult to balance budgets while supporters of aid - including the administation - state that a New York bankruptcy could overwhelm the nation's financial markets as well as cause harm to the city's residents.