Rep. William H. Gray III (D-Pa.), the new chairman of the House Budget Committee, said yesterday that when Congress begins slicing into mounting federal deficits, "everything must be on the table" including Pentagon spending, domestic spending and entitlements such as Social Security.

Gray said he has little enthusiasm for cuts in Social Security. "I'm reluctant to look at Social Security," he said, especially in light of legislation passed a few years ago in an effort to solve the system's financing problems into the next century.

However, he said any federal budget that cuts or freezes domestic spending but does not cut or freeze defense spending will have a tough time in both the House and Senate.

Gray also said there is no sentiment in Congress for a tax increase and no chance that any tax bill would pass without President Reagan's active support. Therefore, a cutback in the growth of defense spending would be necessary to reduce the deficit.

"If you eliminate Pentagon spending [from cuts] and you eliminate revenue increases, then I think a budget that [cuts the] domestic side . . . will run into significant trouble on both sides of Capitol Hill," Gray said in an interview.

"If there's going to be cuts in domestic spending . . . then everything's got to be on the table, and that includes defense spending," he said.

Asked if Social Security and other entitlement programs would be part of the budget-cutting process, he said, "Everything must be on the table. I think that everything just has to be there to begin with."

Gray said domestic spending cannot be cut enough to have any real effect on budget deficits estimated to exceed $200 billion for each of the next several years unless drastic action is taken. He said the total spending for discretionary domestic programs this year is $168 billion.

"There's no way you are going to reduce the deficit through domestic spending," he said.

Gray, 42, a Philadelphia pastor, campaigned for months for the committee chairmanship, which he won without opposition last week. The self-proclaimed liberal is viewed as a consensus-builder who can muffle his spending preferences to promote compromise.

In an interview on his priorities for the Budget Committee, he was careful not to promote any specific plans, although he said he could support some form of "fair and equitable" spending freeze.

"I think there's a good possibility of that approach," he said.

However, he said a freeze would have to be fair and include defense spending in some way.

Gray said he probably would prefer a form of "current services" freeze, which would freeze all programs across-the-board but allow increases to account for inflation.

"Right now, current services seems to be a move in the right direction," he said.

He pointed out that the House last year passed a budget that froze all programs except defense and about a dozen social programs aimed at the most poor, all of which would have received a 3.5 percent increase that would have been financed by a tax increase. However, the Senate balked at a 3.5 percent defense increase, and the tax bill was never seriously considered.

Gray said he also would be willing to look at an "aggregate freeze," which would give all departments the same amount of money they had this year, allowing no increases for inflation.

"If it takes a flat aggregate freeze . . . to ensure economic growth, then I'm prepared to deal with it," he said.

Gray said Democrats will not make the mistake of proposing a tax increase this year. Reagan must lead the way on any tax bill, he said.

However, he said he would like to look at a "tax reform" bill. Although the House Ways and Means Committee would draft any tax legislation, the Budget Committee would have an input through its budget resolutions, which set revenue and spending targets.

"I would certainly welcome an opportunity to look at tax reform," he said.