The Housing and Urban Development Department yesterday announced $288 million in grants to help cities build 14,462 mostly middle-class apartments under a new housing production program.

HUD officials said they did not time the announcement to be made two weeks before the Nov. 6 election but finished reviewing the applications only recently.

HUD opposed the program when Democrats pushed it through Congress last November, and the department initially tried to exclude most major cities from eligibility. But Secretary Samuel R. Pierce Jr. had only good things to say about the program yesterday.

Pierce said the program "is designed specifically to increase the availability of rental housing for lower-income people in cities, urban counties and states where there are spot shortages of suitable housing." In the past, Pierce has played down the possibility that an urban housing shortage exists.

The 141 projects represent a total investment of $741 million. Under the rules devised by Rep. Charles E. Schumer (D-N.Y.) and Sen. Christopher J. Dodd (D-Conn.), cities and developers must agree to pay at least half the cost of each project and to reserve 20 percent of the units for the poor. The rest can be rented at market rates.

The District of Columbia, which submitted only one application, received a $4.1 million grant for a 250-unit project called Mount Vernon Plaza at 10th and M streets NW. The project, to be built by a joint venture that includes a firm owned by a minority woman, will reserve 63 units for the poor.

The rest of the $20.1 million cost will be financed with $2.7 million from developers, $13 million in bonds floated by the city's housing finance agency and $267,000 in U.S. unity development grants.