A key House Appropriations subcommittee, with most members voicing distaste for legalized gambling in the nation's capital, offered yesterday to add $20 million to the District of Columbia's annual federal payment if the city drops plans to conduct a lottery approved by city voters last November.

In a sequence of unexpected actions, the House District Appropriations subcommittee knocked out of next year's city budget the entire $628,000 earmarked to administer the lottery. To replace the city's lost gambling profits, estimated next year at $25 million, the panel then recommended that Congress authorize a federal payment up to $356.6 million, $20 million higher than the present maximum.

City officials reacted with anger and dismay.

City Council Chairman Arrington L. Dixon called the subcommittee action an attack on home rule. He stressed that residents had voted twice on the issue in citywide referendums, first rejecting a broad proposal that would have permitted both a lottery and wagers on jai alai and dog racing and then -- last November -- adopting a narrower measure providing only for a city-run lottery and daily numbers game and legalizing charitable raffles and bingo games. Despite an attempt to overturn it in Congress, the lawmakers agreed to let the measure become law.

Mayor Marion Barry's budget director, Gladys W. Mack, who observed the subcommittee's action, said it would trade a "very problematical" rise in the federal payment for gambling revenues already being included to finance the city's proposed 1983 budget, which will be submitted to the City Council next month.

City officials, Mack said, "are just as interested in preserving a proper image of this nation's capital" as the congressmen critical of gambling. Barry could not be reached for comment.

The assult on funds for the new Lottery and Charitable Games Control Board was launched by Rep. William Lehman (D-Fla.). "I don't think it will add anything to . . . the qulity of life here," he said.

"It will degrade the nation's capital to have lottery signs all over the place," added Rep. Lawrence Coughlin (R-Pa.), whose state runs a lottery of its own.

Support for the city was led by the subcommittee chairman, Rep. Julian C. Dixon (D-Calif.), who was reared in Washington and said the city already has a flourishing, if illegal, numbers game. He recalled from childhood "the little old lady who went door to door selling numbers chances," and speculated that her present-day counterparts are still doing the same.

Dixon also said it would be a bad anti-home rule precedent to use a backdoor method to knock out a program endorsed by the voters in a referendum.He noted that the House District Committee, a separate panel that considers District legislation, had refused in March to invoke its power to overturn the gambling law.

Since the lineup on the panel appeared yesterday to be 4 to 6 to eliminate the funds and propose that the higher fedeal payment be considered by the District Committee, there was no formal vote. The federal payment ceiling of $336.6 million was adopted by Congress just this week, raising the maximum from $300 million. The new measure has not yet been signed into law by the president.

Yesterday's action is the first of at least seven steps the city's budget for 1982 must take in getting through Congress. The $628,000 for the gambling board could be restored along the way, and City Council Chairman Dixon promised a campaign to do so. Budget director Mack said she did not know the legal effect on the gambling program of eliminating the funds.

The five-member gambling commission and its chairman, Brant Coopersmith, have already been named. The panel was scheduled to start developing regulations this fall and anticipated implementing a lottery and daily numbers game late next year.

Coopersmith, a leader of the efforts to win the twm gambling referendums, expressed regret at the congressional action. "It places . . . the board in a terrible quandary. We are sworn under the law to develop regulations to regulate bingo and raffles, at the very least . . . and many organizations and churches facing a cutback in public support are looking to these to supplement their budgets."

The subcommittee's version of the budget for the new fiscal year, which begins Oct. 1, provides for spending $1.66 billion for operations and $211 million for construction programs, a total of $1.87 billion. In addition to locally raised taxes, it would be supported in part by a $300 million federal payment. Dixon said the measure will not reach the House floor until mid-September.

After the president signs the new bill increasing the federal payment to $336.6 million, Dixon said he would support a move in the Senate to provide the higher figure. Mayor Barry has proposed that some of the extra money be used to finance employe pay raises, with the balance going into the city pension fund.

At the urging of Coughlin, the subcommittee decided to reduce the budgets for 10 city agencies and programs by $4.9 million mainly, Coughlin said, because they were proposed as amendments to the city budget and were not part of the city's original proposals. This, he contended, showed they were not high-priority items.

Among the cuts was $1 million, half of what the city sought to administer the new D.C. Housing Finance Agency, established to provide mortgages at below market interest rates for middle-income familes. Mack said the law creating the agency took effect after the original budget was sent to Congress.

Dixon fought back efforts to trim spending for the city's jails, which he described as overcrowded, and for public welfare programs, which are expected to be hit hard by Reagan national budget cuts. The measure provides $114.7 million for a 3,880-member police force, $4.1 million more than the mayor had sought for 3,700 officers. Barry agreed this week to hire 180 new officers as soon as possible. The subcommittee's version of the budget provides for another 80 officers to be hired later.