The Maryland House of Delegates today approved and sent to Gov. Harry Hughes legislation increasing the state's gasoline tax by 4.5 cents a gallon and raising the legal drinking age to 21.

In a marathon Saturday session that was dominated by several thorny political and emotional issues, the House also:

* Approved a slightly modified version of Hughes' $6.2 billion 1983 budget.

* Rejected another attempt to further restrict state-funded Medicaid abortions for poor women.

* Defeated a "death with dignity" bill that would have allowed terminally ill persons to order physicians not to prolong their lives artificially.

With just 16 days remaining in this year's legislative session, the House, in one full day of work, completed work on two of the year's more controversial issues--the gasoline tax and the higher drinking age, both of which were key parts of Hughes' ambitious election-year agenda for this often recalcitrant legislature.

The House's approval of both those measures--and the budget largely intact--left Hughes the major victor today, in sharp contrast to last year when the governor was rebuffed on several key pieces of legislation. Also in contrast to last year, when Hughes was criticized for weak leadership and indecisiveness for not pushing his own programs, the governor took a major role in lobbying for both the gasoline tax and the higher drinking age.

So strong was Hughes' lobbying effort that his opponents now are criticizing him for "wheeling and dealing" to get votes.

"We've had some accommodations made in the last few weeks," said Del. Paul E. Weisengoff (D-Baltimore), leader of the opponents to the gasoline tax. "I would like to ask everyone to vote against the tax who hasn't already gotten his."

The gasoline tax passed by a whopping 83-to-54 vote, after a lively debate spiced with some unusual animation. Del. Robin Ficker (R-Montgomery) dropped pennies from his hand while decrying giving "pennies for Hughes." Weisengoff stood up, telephone cupped close to his ear, and said loudly into his microphone, "No, Harry! There's no deal!"

The gasoline tax will add 2 cents to the price of each gallon of gasoline starting in July, and an additional 2.5 cents next year. Starting in 1983, the tax will automatically increase by a penny each year as long as the wholesale price of gasoline remains above $1.35 a gallon.

The added revenues from the tax will be used to replenish the faltering transportation trust fund, the account that pays for road and bridge maintenance and repair, the Port of Baltimore, and other transportation projects. Proceeds from the first two years have been earmarked for repair and maintenance, to placate rural legislators who complained that too much money is being spent for costly new construction.

"Those roads out there are tough," said Del. Daniel J. Minnick Jr. (D-Baltimore County), the speaker pro tem. "You can't ride down the street without losing your hubcaps."

The gasoline tax passed after the delegates rejected an attempt to make its passage contingent on approval of a separate bill to deny a corporate tax break to businesses. With that tax break for businesses, and the higher gasoline tax for motorists, "what we would be doing is imposing a tax on consumers at the same time we would be giving a benefit to high-bracket taxpayers," said Del. Dennis C. McCoy (D-Baltimore). That measure was defeated by a 92-to-37 vote.

After rejecting one final effort to limit the increase in the drinking age to 19, the House voted 108-17 to increase to 21 the minimum legal age for drinking all alcoholic beverages. Currently, 18-year-olds can drink beer and light wine, because of a 1973 General Assembly law that lowered the age.

Hughes had made the higher drinking age a centerpiece of his legislative agenda this year, and the bill was lobbied intensely by citizens groups, school administrators, and the politically active Mothers Against Drunk Drivers. Although both the House and the Senate had passed identical bills raising the drinking age to 21, and claiming pride of authorship, each had been waiting for the other side to adopt its version. One bill must pass through both houses before it can become law. The House's action today broke the stalemate, and it is that version that now goes to Hughes' desk for his signature.

Under the new law, young people who reach their 18th birthday before July 1 can legally drink and buy alcohol. Those who turn 18 on or after July 1--the date the new law takes effect--will have to wait until they are 21 before they can legally drink or buy alcohol in Maryland.

The vote against the "death with dignity" proposal was 70 to 63. The bill's floor leader, Del. Torrey Brown (D-Baltimore), a physician, pointed out that the proposal was not mandatory, but merely gave a choice to persons "who are going to die anyway."

"This is a bill that says, 'don't plug me in,' " said Del. Joan Pitkin (D-Prince George's).

But Del. Andrew Joseph Burns (D-Baltimore), argued against passage, saying "the medical commmunity is for this. It relieves them of civil and criminal liability," and Del. Wendell H. Phillips (D-Baltimore), a minister, said, "there can be plenty of time to discuss this at the bedside with family and spiritual advisers."

The only moment of controversy during the budget debate came over the second attempt in two days by anti-abortionists to restrict state Medicaid funds for abortions. The move on Friday failed by a vote of 69 to 64, and today's attempt, by Weisengoff, failed 70 to 67, effectively ending the abortion debate in the Maryland legislature this year.

The full budget then was approved by a vote of 111 to 12, without acrimony or debate, reflecting in part the dramatic change from last year when the budget was the center of attention for the ax-wielding General Assembly.

This year, legislators said, there was less zeal for budget-cutting at the state level because of the uncertainty of the effect on programs because of massive federal funding cuts.