A bitter attack Friday by Soviet leader Mikhail S. Gorbachev on recent speeches of President Reagan capped two days of U.S.-Soviet talks that produced little movement on arms control and regional issues dividing the two countries.

Gorbachev's angry words, delivered to Secretary of State George P. Shultz just five weeks before Reagan arrives for a scheduled summit meeting, contained a threat to halt the warming superpower relationship if Washington did not stop badgering the Kremlin on human rights.The Soviet leader complained about the "confrontational" U.S. attitude that is "geared to interference in our internal affairs," according to a report of the meeting carried by Tass, the official Soviet news agency. And, he added:

"We have so far been showing restraint. But if we reciprocate and we can do so over a very wide range of issues the atmosphere in Soviet-American relations can become such as will make it no longer possible to solve any further issues."

Charles Redman, Shultz's spokesman, would not comment on the Gorbachev attack. He told an official at the U.S. Embassy here that he had "no comment" because he had not seen the text of the Tass article. But he also declined an invitation to read the article.

During a half-hour news conference, Shultz himself had not mentioned the Gorbachev diatribe, which occurred in a three-hour meeting in the Kremlin. Senior U.S. officials who briefed reporters afterward covered all details of the talks without a hint of Gorbachev's blistering remarks.

The high hopes once held for the summit, including a new strategic arms reduction agreement that would cut offensive nuclear forces by half, had been virtually ruled out by the lack of progress here during Shultz's meetings. Both sides, without saying so explicitly, are now looking beyond the May 29-June 2 summit for completion of the START agreement, officials said privately.

The Soviet leader did end his complaints by saying he hoped that the top-level meeting with Reagan would be held in spirit of mutual respect and realism.

The attack has some of the earmarks of a propaganda campaign and could be intended to draw attention away from a leadership challenge that Gorbachev seemingly has recently faced.

But it was apparently the first time he delivered such a barrage, and hementioned Reagan by name. As such, it must raise some doubt about the ultimate success of the summit itself, whether it contains much substance or not.

The proximate cause of his outburst was recent speeches in Las Vegas and Massachusetts in which Reagan turned back considerably toward his original hard-line rhetoric against the Soviet Union.

Thursday, Reagan had said that just as a Soviet Union "that continues to suppress free expression, religious worship and the right to travel" cannot develop normal relations with the United States, "neither can a Soviet Union that is always trying to push its way into other countries ever have a normal relationshp with us."

Gorbachev, in his meeting with Shultz, focused immediately on what content and atmosphere are needed for a successful summit in Moscow, Tass said. He complained that recently Reagan had been delivering "sermons" telling Moscow how to behave and criticizing all its foreign policies.

"Moreover, everything that has been achieved in Soviet-American relations is being ascribed to the policy of strength and putting pressure on the Soviets," even while Washington tries to demonstrate strength in Nicaragua, the Persian Gulf and Panama, Gorbachev said.

Official U.S. statements count on "fundamental concessions by the USSR," he said, and the various U.S.-Soviet negotiations, "including those connected with President Reagan's visit to Moscow," are slowing down.