A Democratic governor fell in Massachusetts and a Republican senator survived in Vermont yesterday, as four New England states went to the polls to settle nominations for November.

The banner race was the Democratic rematch between Massachusetts Gov. Edward J. King and former governor Michael S. Dukakis, who lost his job to King in the same primary four years ago. This time, Dukakis prevailed, pulling about 53 percent of the very heavy vote.

Meantime, Sen. Robert T. Stafford (R-Vt.) turned back two challengers, who claimed he had stayed too long in Congress and grown too fond of the perquisites of his office. Stafford, a powerful friend of environmentalists as chairman of the Senate Environment and Public Works Committee, was maintaining an 11-point lead over the closest of his two rivals, thanks to strong support in major cities. Incumbent senators were renominated in Massachusetts and Rhode Island and incumbent governors took the first step toward re-election in Vermont, New Hampshire and Rhode Island. Massachusetts

The King-Dukakis battle escalated from a personal feud into a multimillion-dollar contest of economic and social philosophies that was watched apprehensively by Democrats across the nation as a potentially ruinous civil war in what has been one of the party strongholds.

King advertised his admiration for the economic policies of President Reagan and campaigned as an opponent of abortion, a supporter of capital punishment and tough law-enforcement. Dukakis replied that none of these issues outweighed what he called a "pattern" of corruption in the King administration.

In the end, it was probably a superior vote-turnout effort by the Dukakis organization that provided the margin of victory for the former governor.

King, who claimed credit for reducing the taxes and welfare spending he said Dukakis had let go unchecked, was one of the few Democratic governors cheering President Reagan's economic policies during the past two years.

Dukakis, while denying the big-spender label, campaigned heavily in the closing days -- both on television and in person -- with Sen. Edward M. Kennedy (D-Mass.), who had no primary opposition in the first step of his bid to extend his 20-year Senate career.

Kennedy will be opposed in November by businessman Raymond Shamie, a political newcomer.

The $5 million King-Dukakis fight overshadowed a three-way Republican gubernatorial primary.

The front-runner early in the campaign, businessman John Lakian, was damaged by a Boston Globe story questioning parts of his campaign autobiography. Former Boston city councilman John W. Sears stepped forward to exploit the opening, while the third candidate, state representative Andrew Card was unable to muster the financial resources to force his way into the race. Sears was drawing about half the GOP votes, with Lakian edging Card for second place. Vermont

Veteran Republican Sen. Stafford, 69, accepted concessions from his two competitors. Businessman Stewart M. Ledbetter, who came close to upsetting Democratic Sen. Patrick J. Leahy, in 1980, mounted an aggressive television campaign, questioning Stafford's overseas travel and his acceptance of outside honoraria. A third candidate, former Reagan White House domestic policy aide John McClaughry, attacked Stafford's voting record from the conservative flank.

But the incumbent, who had not lost an election in a career going back to 1946, emphasized his work on clean air and highway legislation as chairman of the Senate Environment and Public Works Committee, and rolled to another victory.

With more than nine-tenths of the precincts reporting, Stafford was drawing 46 percent, Ledbetter 35 percent and McClaughry 19 percent. There were indications that Stafford, who was backed by both labor and environmental groups, benefited from a significant Democratic cross-over in the major cities.

In the Democratic primary, former secretary of state James A. Guest Jr., 41, the national president of the Consumers Union, had only nominal opposition.

Some Democrats said the anti-Stafford Republican vote was an encouragement to Guest's chances in a November race in which the incumbent had been the early favorite.

Republican Gov. Richard A. Snelling, who changed his mind about retiring, had no opposition in his bid for nomination to an unprecedented fourth term. Lt. Gov. Madeleine M. Kunin easily disposed of token opposition on the Democratic side to challenge Snelling. New Hampshire

Next door in New Hampshire, two-term Gov. Hugh Gallen (D) escaped without a primary fight, but learned he might face an old foe in November, when former governor Meldrim Thomson Jr. (R) beat the deadline by a couple of hours and filed for election as an independent.

Eight candidates vied for the GOP nomination, with the advantage in a very close race being held by engineering professor John Sununu, once considered by President Reagan for appointment as secretary of energy. He held a small lead over state Senate president Robert B. Monier, a staunch conservative, with former executive councilor Louis D'Allesandro, a moderate, in third place.

Monier, who had the backing of the Manchester Union-Leader, trailed Sununu by about 1,100 votes in an unofficial count of all but 12 precincts. D'Allesandro was another 750 votes back. Thomson, a national leader in conservative movements as governor, said he would campaign actively in the general election only if D'Allesandro won the GOP nomination. Rhode Island

In Rhode Island, neither three-term Gov. J. Joseph Garrahy (D) nor freshman Sen. John H. Chafee (R) had primary opposition. Vincent Marzullo (R), a onetime Garrahy aide, was drafted by Republicans to oppose his old boss, and former state attorney general Julius C. Michaelson easily defeated anti-abortion candidate Helen Flynn to gain the Democratic nomination against Chafee.