NEW YORK (AP) _ The infant death rates in New York City welfare hotels are worse than in the city's poorest neighborhoods and even rank below some developing countries such as Trinidad, Tobago and Costa Rica, according to a Health Department study.

The death rate at the hotels - where the city houses most of its 4,100 homeless families - was 25 of infants under the age of 1 for every 1,000 births to women staying in the hotels between 1982 and 1984. Their average stay was a year.

''The mortality figure in the hotels is high for the United States,'' said Dr. Wendy Chavkin, the Health Department's director of maternity services and a co-author of the report. In 1984, the national rate was 11 deaths for every 1,000 births, she said.

Trinidad and Tobago had 24 deaths for every 1,000 births and Costa Rica had 19 deaths, according to 1983 figures.

The hotel rate surpassed that in the city's poorest neighborhoods such as Bedford-Stuyvesant - the neighborhood with the highest infant mortality rate in the city - with 23 deaths for every 1,000 births, and Central Harlem with 16 deaths, the study said.

The rate for babies in public housing projects was 17 for every 1,000, and the figure for the city in general was 14.

Advocates for the homeless said the study, based on birth and death certificates from June 1982 to June 1984, showed the city was failing a vulnerable, troubled population.

''The figure is shocking,'' said Nancy Wackstein, former coordinator of the Emergency Alliance for Homeless Families and Children, a private social- welfare organization. ''I suppose though, it shouldn't be surprising, considering the conditions in these welfare hotels.''

City officials, however, said they had remedied any gap in services for these families in crisis. Stella Schindler, a deputy commissioner of the Human Resources Administration, said the rate ''doesn't provide a full, truthful picture,'' because health services in the hotels had been improving since 1984.

Moreover, she said, the hotel populations are ''very unstable to begin with.''