Then Sen. Edward M. Kennedy (D-Mass.) came to Hartford last week to campaign for Democratic congressional candidate Barbara B. Kennelly, he warmly endorsed his friend "Barbara McNelly."

That caused Kennelly to grimace for a moment. But she has little else to frown over. She is the heavy favorite to win election to Congress Tuesday, to succeed Rep. William R. Cotter, who died of cancer four months ago.

Kennelly's Republican opponent in the special congressional election, Ann P. Uccello, is struggling to overcome a 2-to-1 voter registration gap--the 17-town district has 130,000 Democrats to 65,000 Republicans--and an equally vast fund-raising gap--Kennelly has raised $148,000, Uccello $50,000.

As a result, both candidates have to keep reminding voters that there is an unusual but important election Jan. 12.

Kennelly hands out buttons that say 1-12-82, to the confusion of some voters. "What's that, the lever I've got to pull?" one voter asked Kennelly. "That's the date of the election," she answered doggedly.

Uccello gives away 1982 pocket calendars with her name on the flip side. She hopped onto a bus before dawn the other day, startling sleepy-eyed commuters as she bustled down the aisle giving away her calendars.

Both candidates are trying to make the election a referendum on President Reagan's economic policies.

Uccello is a strong advocate of spending more money on mass transit, but generally she is a fiscal conservative who says the Reagan administration's economic program should be given a chance to work.

She defends Reagan constantly, saying that while she knows the budget cuts and ailing economy hurt the district, the austerity program is necessary.

She charges Kennelly supports discredited efforts to solve the nation's problems "by throwing an awful lot of money at them."

Kennelly, on the other hand, charges that tax cuts Reagan proposed mostly help the rich and that inflation is being curbed at the expense of employment.

"We're accepting the fact that we can have 9 million people unemployed," she says.

On social issues, they are traditionalists in their party positions. Kennelly backs the Equal Rights Amendment and opposes a constitutional ban on abortions. Uccello opposes the ERA and would vote for the abortion ban.

Kennelly is well entrenched in the state Democratic organization because of her pedigree. A 45-year-old mother of four, she is the daughter of the late John M. Bailey, the long-time boss of Connecticut Democratic politics and national party chairman under Presidents Kennedy and Johnson.

She is married to a former speaker of the Connecticut House of Representatives and in her own right won election to the Hartford City Council in 1975 and gained her current job, secretary of the state, in 1978.

She is thought to want to run for governor, following in the footsteps of the late Ella T. Grasso. But she insists she just interested in going to Washington.

Uccello, 59 and single, is also a proven vote-getter, but she last ran for office 12 years ago. She won two terms as Hartford mayor in 1967 and 1969, but narrowly lost when she ran against Cotter for the congressional seat in 1970. Six months later she took a job in Washington, with the Department of Transportation, staying there six years.

She has had a much tougher route to Tuesday's election. When Kennelly announced her candidacy, a long list of potentially strong rivals for the Democratic nomination all dropped out.

But Uccello had to win a tough convention fight to secure the Republican endorsement, and then beat Colleen Howe, wife of hockey star Gordie Howe, in a primary for the nomination. That left her one month to take on Kennelly.