The government yesterday launched a brand-new program to help bail out failing hospitals in communities without other medical facilities.

Secretary of Health and Human Services Patricia Roberts Harris did not say how big the program will be, only that it will begin on an experimental basis. But statistics given by aides show that the program's potential could require hundreds of millions of dollars or more a year if established on a large scale.

Harris said at a news conference thatat least 50 million people live in communities without adequate medical sevices. Many are in low-income, rural areas and desperately poor urban communities, she said.

The health needs of America would be badly served if a hospital supplying almost all the medical care of any type in a community were allowed to close for want of money, Harris said.

Therefore, she said, HHS would use existing authority, permitting it to spend money for medical and welfare demonstrations and service experiments, to help such hospitals stay open.

She gave no figures on potential cost or numbers, but Nathan Stark, the under secretary who headed the task force that studied the problem, said that in the current fiscal year there might be six to eight projects.

Once the outlines of a full-scale program were worked out, Harris said, money would be sought from Congress to fund the program on a larger scale, starting with the fiscal 1982 appropriation.

A prototype of how the program might work was unveiled yesterday by Harris when the government and New York City agreed on a plan to keep open two Harlem hospitals -- Metropolitan and Sydenham -- that the city said it could no longer afford.

Because these hospitals are the major facilities available to poor people in Harlem, Harris said, the government has agreed to provide $7.7 million a year for five years, with the city and New York state providing like amounts, to keep them open.

Metropolitan will eventually be converted into a general health maintenance organization offering complete medical services, while Sydenham will become an alcohol and drug treatment center.

Last year, Harris, in a similar arrangement, offered $5.6 million annually to Brooklyn Jewish Hospital, which serves the low-income Crown Heights-Bedford Stuyvesant area.

Harris refused to estimate the costs of a full-scale program, but some numbers she and Stark used hinted at what it conceivably could be.

All told, there are 7,000 hospitals in the United States, and Stark said about 1,400 showed a deficit.

But not all would be considered for participation in a full-scale program because many are not in otherwise unserved communities. Stark said that perhaps 100 might be in communities that lack other facilities and would be good candidates for the program.

He didn't say whether he would favor funding for all of these but, if only 50 eventually were -- at the same $5 million to $7 million as authorized for the Brooklyn and Harlem projects -- the potential tab could easily mount to $350 million a year.

Officials said the idea is to go slow, with only a half-dozen or so projects funded this year, and then decide how much expansion to seek and finance in next year's budget.

Harris called the federal aid a last resort, going only to failing hospitals needed to serve poor people, and to hospitals that agreed to maintain services and streamline operations and make a renewed effort to collect unpaid bills.