Despite major political differences and a climate of tension, Secretary of State Cyrus R. Vance and Soviet Foreign Minister Andrei Gromyko said yesterday they have created a basis for narrowing the gap between the two countries on the limitation of strategic nuclear weapons.

Vance and Gromyko, ending two days of talks that centered on strategic arms, were careful not to claim that they have achieved a new meeting of minds on any unresolved point or even that tangible progess has been made.

In the context of the heated controversy over the trials of dissidents in the Soviet Union, however, theeir relatively hopeful remarks about a new strategic arms limitation treaty and expressions of desire for improved relations were signs that the senior diplomats, at least, were seeking ways to prevent a further deterioration of superpower ties.

Less than half an hour after leaving Gromyko's side at the Soviet mission, an ornate villa which once was headquarters of the Lithuanian mission to the League of Nations, Vance met with the wife of Soviet dissident Anatoly Scharansky, whose trial is expected to end in Moscow today.

Vance promised, she told reporters that the United States will do everything possible to obtain the freedom of her husband and that the efforts would not be held up by any negotiations with the Soviet Union.

Earlier, Mrs. Scharansky received a telephone call here from Rosaylnn Carter. "Mrs. Carter touched my heart. She spoke to me like a mother," the wife of the Soviet defendant said.

After his final meeting with Gromyko, Vance said both sides presented "new ideas," which, according to informed sources, dealt mainly with the knotty problems of future improvements to their respective nuclear arsenals.

The rwo men agreed to meet again on SALT when Gromyko visits the United Nations this fall, and some U.S. sources held out the possibility that leaders in Washington and Moscow may reach acceptable compromise positions on new missiles before then.

"We both hope we can complete a sound SALT agreement this year," Vance said.

Gromyko, standing by his side on the doorstep of the Soviet mission here, added in English, "the sooner the better."

U.S. officials indicated that it is not likely that a new SALT treaty will be signed prior to the November election. There is little chance in any case that the Senate would tackle the controversial and momentous treaty this year.

As he did on previous occasions, Gromyko declined to answer reporters' questions about the current trials, saying that they are "within the internal competence of the Soviet Union." He added to the press, "I have no intention of discussing (them) even with you."

In an effort to keep the political controversy separate from the "paramount" question of strategic arms, Vance and other members of the U.S. delegation stuck strickly to the main business in their lenghty discussions of strategic arms. The secretary of state mentioned the dissidents' trials and other U.S. Soviet political difficulties only in his private meetings with Gromyko.

During the course of their meeting Vance delivered a strong U.S. protest over the Scharansky treason trial and President Carter publicly denounced the Soviet government's charge against him as "patently false."

Gromyko's decision to participate in a joint press conference for nearly 20 minutes with Vance at the end of the talks and his restrained a demeanor there, appeared to reflect a decision to puy a relatively good face on relations with Washington for the eyes of the world.

"We would like to see United States-Soviet relations better and enriched," Gromyko said. "On our side we are doing all we can to reach that goal. Tensions between the two countries can yield nothing but harm to the people of both countries."

Vance expressed hope that the talks with Gromyko could lead to a bettering of relations. "I think it's important. Anything we can do will be very constructive," he said.

For all efforts in facing the prss together, this sixth round of meetings between Vance and Gromyko in 14 months was deeply affected by the deterioration in relations between the two states. In view of the political problems, U.S. officials had said in advance that, at best, they could hope for serious give and take which might be the basis for later agreements, rather than breakthroughs in the course of the meetings. This possibly significant but modest result is what Vance and Gromyko claimed.

Without political will on the part of the national leaders the differing ideas advanced this week cannot be translated into agreement. "Decisions are not taken with the suddenness of a cloudburst," Gromyko warned. The Soviets are irritated, in fact, that the United States is unwilling to move faster.

The main issue in the two days of talks, according to U.S. sources, was the testing and deployment of new types of powerful missile systems which one or the other of the superpowers wishes to prepare for its arsenal during the three years of the proposed SALT protocol or the seven years of the proposed SALT treaty.

The White House has promised nuclear arms establishment in the Pentagon and Congress that the U.S. will insist on the right to develop a new generation of "MX" Missiles, probably a large mobile weapon with multiple warheads. The Soviets would like to develop a follow-on single warhead missile to replace some of their aging heavy missiles.

In the Geneva sessions, the two sides were jockeying for ways to accomodate the planned improvements in their respective arsenals to the agreed limitations on their future nuclear arms development and those of the other superpower. In other words, they are seeking ways to limit the dangerous and expensive nuclear arms race without stopping a continuing buildup of new weapons which are considered essential.