The House yielded to pressure from the banking industry yesterday and voted, 382 to 41, to repeal the withholding of taxes on interest and dividends.

The Senate has passed legislation to postpone withholding until 1987, so the provision will almost surely be rescinded before July 1, when it is scheduled to take effect.

President Reagan has vowed to veto any repeal of the withholding provision. But questioned about it at his news conference last night, he did not repeat that veto threat. Instead, he said he would not comment because "I understand that there is some talk . . . . of a compromise," and added that he will wait until Congress takes final action.

White House spokesman Larry Speakes said later that Reagan was referring to a possibility that the House-passed bill could go next to the Senate Finance Committee, where the administration hopes the provision can be modified. White House officials have said that Reagan may accept a postponement of withholding, even though he has threatened to veto a repeal of the provision.

Finance Committee Chairman Robert J. Dole (R-Kan.) said yesterday that he intends to press for a compromise, and criticized the House vote. "I don't know why they gave away the store and put the bankers in charge of the House," he said.

The withholding provision was the largest single item in the tax increase Congress passed last year. It would raise $13.4 billion over the next six years, much of it in taxes on income that now goes unreported. It has been staunchly defended by Reagan and leading members of both houses of Congress.

But the banking industry mounted an extraordinary campaign to repeal it, producing an estimated 22 million letters and post cards to members. And yesterday's vote was well in excess of the two-thirds needed to override a presidential veto.

During the brief debate, withholding's few supporters denounced the bankers. "They engaged in the kind of campaign that does not belong in a democratic society," Rep. Robert T. Matsui (D-Calif.) said. "I regret the freight train coming down the track," said Rep. Barber B. Conable Jr. (R-N.Y.), ranking Republican on the Ways and Means Committee.

But Rep. Norman E. D'Amours (D-N.H.), leader of the repeal drive, said before the vote, "Today we are going to see democracy in action, and the voice of the people will be heard. Grass-roots America understands this issue."

The Senate bill is an ostensible compromise in which withholding would be delayed at least until 1987; it would require a vote of Congress to reinstate it at that time. Meanwhile, there would be new reporting rules and penalties for failure to pay taxes on interest and dividend income.

Senate leaders can simply accept the House bill or go to conference.

Rep. Dan Rostenkowski (D-Ill), chairman of Ways and Means and a withholding supporter, has so far rejected all efforts at a compromise of the kind the Senate approved. The Senate bill was in part an effort to save the president the embarrassment of an outright defeat. Rostenkowski's preference has been to keep the issue clear-cut.

Among other things, he was angered when a House majority took the unusual step of signing a discharge petition to pry the repeal bill out of his committee. Of the 218 members signing the petition, 131 were Republicans. To a large extent it is the president's own party that is defying him on this issue.

The Treasury Department, however, has outlined a possible conference compromise on the issue. Under it, withholding would be repealed except for persons found to have evaded taxes on interest or dividends.

The Internal Revenue Service would inform these violators' banks, which would then be required to withhold at a 20 percent rate. In addition, new $1,000 penalties would be established. This proposal would raise an estimated $4.9 billion through 1988.

In separate tax action, the Senate Finance Committee yesterday approved the Reagan administration's proposal to establish low-tax enterprise zones to attract industry to the poorer sections of the nation's cities.

Under the proposal, which faces a dubious future, the administration would be authorized to set up 75 zones over three years.

In these areas, employers would get a 10 percent tax credit for any increase in their payrolls and a 50 percent credit for wages paid to disadvantaged workers.

Employes in the zones would get a 5 percent tax credit of up to $525 a year on their wages.

In addition, capital gains taxes would be eliminated in the zones, and new investment tax credits would be created for real property in them.

The cost of the legislation would grow from $100 million next year to $1.1 billion annually by 1987.