THE DEPARTMENT of Housing and Urban Development has taken on a tough one by telling the city of Chicago to get more subsidized housing started or risk losing millions in federal funds. At the heart of the problem is official and community resistance to changing residential patterns that are among the most rigidly segregated in the country. For several years, the city housing authority and HUD have been under court order to put 60 percent of subsidized housing into largely white neighborhoods. As a result, few low and moderate-income projects have been completed anywhere in town.

This is a clash between two worthy objectives; More open housing and more adequate housing. So it is not going to be very easy to work out. And national administrations have not shown themselves to be eager to take on the powers-that-be in Chicago. But President Carter seems to have given HUD Secretary Patricia R. Harris and Assistant Secretary Robert C. Embry Jr. considerable freedom to try to persuade communities to meet their housing obligations. Besides cracking down on a number of suburbs (including Fairfax County;, HUD has recently imposed conditions on community development grants to Boston, Philadelphia and other cities where serious housing problems or racial discrimination persist. The department could hardly have stayed silent in Chicago without undermining its efforts around the country.

Even with presidential backing, HUD is engaged in a difficult fray. It cannot force communities to accept subsidized housing; it can only deny some funds if they refuse. The trick is to use the grant as leverage to get some politically unpopular projects through. Some jurisdictions, mostly suburbs, have chosen to forego the aid. But for a major city, that can be a costly course: Chicago's community development grant this year is $117.8 million. The prospect of jeopardizing it should be enough to stir Mayor Michael A. Bilandic and other city officials to exercise some leadership, comply with the orders of the court, and finally start providing more adequate, diverse housing opportunities for the Chicagoans who have been locked in ghettos so long.