The D.C. Council, bowing to longtime pressure from Congress and the recent support of Mayor Marion Barry, voted last night to raise the District's drinking age to 21 for all types of alcohol but to continue to allow persons who are 18 by the end of this month to buy beer and wine.

The city will become one of the last jurisdictions in the country to increase its drinking age to 21. Under the threatened loss of federal highway funds, all but seven states now have adopted a 21-year-old minimum, according to federal officials.

Members of Congress and officials in Maryland and Virginia, which already have raised their drinking age, have argued that the District had become a magnet for young persons throughout the area who come to the city to drink and then drive home drunk.

But several council members made it clear last night that their vote to adopt the higher drinking age was forced on them by an insistent Congress, with some congressmen threatening deep cuts in the District's federal appropriation if it did not comply.

"We are doing it because we have to do it," said Council Chairman David A. Clarke, who in the past has criticized raising the drinking age. He suggested that the suburban jurisdictions that had put pressure on the city for the change should enact gun control legislation such as the District's to keep another dangerous substance out of young people's hands.

The council voted 10 to 3 to consider the drinking age legislation on an emergency basis and then approved the bill itself, to become effective Sept. 30 with provisions to "grandfather in" persons already 18.

In a late-night session attended by a standing-room-only crowd, the council also adopted a pay raise for council members and gave tentative approval to a measure to turn the embattled Antioch School of Law into a public law school to be merged in three years with the University of the District of Columbia. [Story on Page C1.]

The council pay raise, the first one legislated since 1979, would tie the council chairman's salary, now $ 57,475 a year, to that of heads of executive agencies, now $ 65,930. Other council members would receive salaries $ 10,000 lower than the chairman's.

If a proposed resolution is approved next month, as expected, to raise department heads' salaries to $ 68,567 in October, members would be able to look forward to a salary increase of some $ 11,000 by next year when the pay raise legislation would be expected to go into effect, according to administration and council aides. One knowledgeable council aide, who asked not to be named, said it would apply only to those starting new terms, however.

Council member Carol Schwartz (R-At Large), who is challenging Barry in the Nov. 4 general election for mayor, asked to be recorded in opposition to the increase.

The plan for a city takeover of Antioch was approved in a 7-to-2 vote, with four members abstaining, after three hours of debate. Dwight Cropp, the mayor's director of intergovernmental relations, said that Barry had opposed an earlier proposal for the District to take over Antioch but had not yet seen the new version of the bill to take a position on it.

The council's District Building chambers were packed with an overflow crowd that included Antioch supporters and college-age people, some of whom said they wanted to make known their opposition to the change in the drinking age. The District's drinking age now is 18 for beer and wine and 21 for liquor.

In an effort to curb drunk driving, Congress in 1984 approved legislation aimed at forcing states to adopt a 21-year-old drinking age. States that do not conform are scheduled to lose 5 percent of their federal highway funds in fiscal 1987, which begins Wednesday, and 10 percent the following year.

In the District, this amounts to $ 2.6 million in fiscal 1987 and $ 5.2 million in fiscal 1988.

Earlier yesterday the Prince George's County Council sent a letter to the city urging it to increase its drinking age to 21 and to vote against proposals that would exempt or grandfather any current age group.

Clarke last night defended the grandfather clause as necessary to be fair to young persons who already have been able to drink in the city.

"How can you tell somebody they can drink when they become 18, and then say at 19 they can't?" Clarke asked.

Council Member John Ray (D-At Large), chairman of the committee with jurisdiction over the drinking age and the strongest opponent of the increase, charged that Barry had come out in support of the 21-year-old drinking age only because of congressional pressure but was publicly calling it an effort to save lives.

"I wish the executive branch would get away from this Mickey Mouse, Donald Duck way of doing things," he said in trying to persuade his colleagues to vote against the change.

In addition to Ray, council members Wilhelmina Rolark (D-Ward 8) and Betty Ann Kane (D-At Large) voted against the emergency legislation.

The council last night also gave tentative approval to legislation making a major overhaul of the city's inheritance and estate tax system, designed to protect surviving spouses and small estates from the taxes, and to a measure to provide child care for city employes in government buildings.

It voted final approval to measures designed to identify and correct pay disparities for some women and minorities in the city government, to strengthen efforts to enforce child support payments, and to make information available to the public on records of city cabdrivers.

The legislation approved last night, except for the emergency legislation, cannot become effective until the end of a congressional review period which probably will not end until next March because Congress is scheduled to adjourn soon for the year.