Bankers Trust Co., the nation's eighth largest, said today it had reached agreement in principle with three banks that want to buy 55 of the 103 branches Bankers Trust maintains in the New York metropolitan area.

Bankers Trust, with deposits of about $18 billion, has been anxious for several years to get out of the increasingly competitive retail banking business in New York and concentrate on dealing with business.

The consumer banking business in New York is dominated by Citibank, the nation's second largest, which has spent millions of dollars to set up a network of 24-hour banking centers.

Bankers Trust had hoped to sell 89 of its branches to the Bank of Montreal, but negotiations between the two institutions broke down last March.

Eventually, the bank said, it hopes to pare all but 15 of its branches. If it did so today, the bank would still have deposits of about $17 billion. The 55 branches it said it is close to selling have total deposits of about $600 million.

Bankers Trust said it has been approached by other institutions who are interested in buying another 30 of the bank's branches.

The banks negotiating with Bankers Trust include:

Barclays Bank of New York, owned by the giant British Bank, which wants to buy 21 branches in Long Island's Nassau and Suffolk Counties and seven branches in New York City.

National Bank of North America, owned by Britain's National Westminster Bank, which hopes to purchase 10 branches in New York City.

Bank Leumi Trust Co. of New York, owned by the Israeli Bank Leumi, which wants to acquire 11 branches in the city.

A spokeman for Bankers Trust said the bank hopes to reach final agreement within six weeks with one or all of the potential purchasers. But it would probably take until early next year before bank regulators would approve the purchases. National Bank of North America is regulated by the Comptroller of the Currency, while the other two banks are supervised by New York state.

Bankers Trust New York Corp., the holding company which owns Bankers Trust, also owns about 100 banks in upstate New York. The holding company plans to hold on to these banks, a spokeman said.

In another development, New York banking superintendent Muriel Seibert said that Marine Midland Banks, Inc., which owns the big Buffalo-based bank, would have been able to raise new capital without being acquired by Hong Kong & Shanghai Banking Corp.

The Hong Kong bank had applied to the New York banking regulators for approval to purchase 51 percent of Marine Midland, but withdrew the application earlier this week after Marine Midland announced it would apply for a national charter. CAPTION: Graph, The Market, June 29, The Washington Post