President Carter neared the end of his fall campaigning for Democrats with a hand-in-hand, if not quite heart-to heart, appearance here yesterday with his sometime party rival, Gov. Edmund G. (Jerry) Brown Jr.

Speaking to thousands of persons at a downtown early afternoon rally, the president called Brown "one of the greatest governors" in the nation and a champion of lower taxes and efficient government.

At the end of his speech, apparently at Brown's suggestion, the president returned to the microphone and urged Californians to vote against a constitutional initiative on the state ballot next Tuesday that would authorize the firing of public school employes who engage in or encourage homosexual acts.

The president thus joined a growing list of prominent persons here, among them Brown and former California Republican governor Ronald Reagan, who have called for the defeat of the measure, known as Proposition 6 on the ballot.

Carter stopped here during a whirl-wind campaign day that took him from the midwest yesterday morning, to the West Coast in the afternoon and then back to the midwest. He was scheduled to return to Washington and go by helicopter to Camp David, Md., last night.

The theme of his two-day trip, which began Thursday, was a series of "get out the vote" rallies for Democratic candidates in Tuesday's elections. Of the six campaign stops he made in the last two days, yesterday's breif visit to the California capital was the most interesting politically because of the continued, underlying rivalry between him and Brown.

Brown defeated Carter in five 1976 presidential primaries and is considered an almost certain big winner in his reelection bid, hardly in need of a boost from the traveling presidential entourage. He remains a possible primary opponent of the president in 1980 should Carter stumble, a fact that has not been forgotten by White House political strategists.

But yesterday the rivalry appeared to be pushed aside, at least by Carter bounding on the stage at the rally. He grabbed Brown's hand and hoisted it over his head.

The president has become accustomed to lengthy introductions filled with recitations of his accomplishments on this trip. But Brown has never been accused of being a conventional politician and he did not disppoint yesterday.

Proclaiming that Democrats have cut taxes on the federal, state and local levels, he said simply, "I present you our president, President Carter."

From Sacramento, Carter flew to Duluth, Minn., for a final campaign appearance for Minnesota Democrats.

Earlier yesterday, Carter stopped at Mt. Hood Community College outside Portland to campaign for Oregon's politically hard-pressed Democratic Gov. Robert Straub.

As he did in similar "get out the vote" rallies Thursday in New York, Michigan and Illinois, the president urged his audience to support Democratic candidates on Tuesday, defended his anti-inflation program and the steps he ordered to shore up the dollar and, with obvious satisfaction, announced the decline in the unemployment rate to 5.8 percent.

White House officials later quoted Council of Economic Advisers Chairman Charles Schultze as saying the drop in the unemployment rate was further evidence that the economy can withstand anti-inflation measures without going into a recession next year.

Carter also declared in Oregon that "I intend to succeed in having a good SALT [strategic arms limitation treaty] agreement [with the Soviet Union] in the next few weeks" - a statement similar to his prediction, made at an Iowa political rally in October last year, that a SALT accord would be reached "in a few weeks."

White House officials undoubtedly recalled that ill-fated, 13-month-old prediction as they rushed to clarify the president's comments. En route to Sacramento from Portland, press secretary Jody Powell talked to Carter on Air Force One and then told reporters:

"The president said there is no basis to make a specific prediction. It's a possibility we'll have one before the end of the year, but that is by no means certain."

Thousands crowded into the main square of the Mt. Hood Community College campus to see Carter. The crowd was mostly students, plus a contingent of opponents of the shah of Iran - now almost as familiar a sight at the president's appearances as the Secret Service.

It was also the most disinterested crowd Carter has encountered while campaigning this fall. His speech was accompanied by a constant buzz of conversation in the audience.