The White House is warning that if Congress wants to enact new spending programs for the coming fiscal year, lawmakers will have to find offsetting savings elsewhere or face unpopular, automatic budget cuts.

The Reagan administration's Office of Management and Budget projected Thursday that the fiscal 1989 federal deficit would come in just under the $146 billion target set in the Gramm-Rudman balanced budget law.Under that legislation, if the budget office determines that the red ink will exceed $146 billion, spending on defense and domestic programs must be slashed automatically by whatever amount is necessary to shrink the deficit to $136 billion.

"In that case, congressional overspending will trigger across-the-board cuts that slash high priority programs every bit as much as lower priority programs," President Reagan warned from Los Angeles, where he is vacationing.

OMB estimated that, including programs enacted through Aug. 15, the fiscal 1989 deficit would be $144 billion. When figuring in programs signed into law over the past few days, the amount of red ink grew to $145.3 billion, just $700 million below the $146 billion budget-cut trigger.

White House budget chief James C. Miller III noted that when lawmakers return from their summer recess next month, they plan to consider a collection of popular bills - including hunger relief, anti-drug programs, welfare reform, child care and a minimum-wage increase - that would boost the deficit beyond $146 billion.

Miller told reporters that if those bills were enacted, lawmakers would have to find compensating savings elsewhere or face the automatic cuts.

House Budget Committee Chairman William H. Gray III, D-Pa., said he believed spending would be kept under control.

"It's clear that Congress and the president are going to have to walk a fiscal tightrope in the coming weeks, but I believe we can maintain our balance and avoid crippling, across-the-board cuts," Gray said in a prepared statement.

Lawmakers are unlikely to set off the Gramm-Rudman process of spending cuts and risk the wrath of voters angry because their favorite programs have been slashed.