MOSCOW (AP) _ Kremlin leader Mikhail S. Gorbachev told the Soviet people today that if necessary, the country will respond to the U.S. ''Star Wars'' program that President Reagan refused to curtail during the Iceland summit.

''Soviet people know this, and all people around the world should know this as well,'' Gorbachev said in a nationally televised address. ''But we are opposed to a power play. This is an extremely dangerous undertaking in the nuclear missile age.''

Gorbachev and Reagan, in two days of talks in Reyjkavik, Iceland, agreed in principle to radically reduce strategic weapons and eliminate medium-range missiles from Europe.

But the potential agreements were conditioned on Soviet insistence on confining space weapons research to the laboratory. Reagan rejected this, and no final agreement emerged although both sides said they still had hopes that the progress made in Reyjkavik will continue in disarmament negotiations in Geneva.

The Soviet leader indicated in his speech that more than the Star Wars program was an obstacle for at least part of the arms control measures they discussed. Gorbachev said the Soviets accepted Reagan's proposal that both sides eliminate all medium-range nuclear missiles from Europe, the so-called ''zero-zero'' option.

''And still, we felt the intention of the Americans to disrupt the agreement under the guise of their special concern for their allies in Asia,'' he said, without immediate elaboration.

Gorbachev said Reagan had not been ''prepared to solve fundamental questions in a big way, to cover his part of the road so as to really give an impulse to resultful and encouraging talks,'' according to excerpts of his address transmitted by the official news agency Tass.

''But it is to this that I called the president in my letter inviting him to the meeting, to give an impulse to the talks on nuclear and space arms,'' he said.

''Our partners lacked the breadth of approach, understanding of the unique character of the moment and, ultimately, courage, responsibility and political determination that are so necessary for resolving vital and complicated world problems,'' Gorbachev said in his 65-minute address.

Soviet newspapers today did not publish any major analyses of the summit, the second meeting between the superpower leaders in 11 months.

Vladimir Alexeyev, a commentator for the government press agency Novosti, said the summit will result in more pressure on Washington to alter its policies.

''After this meeting, it will be doubly hard for the United States to cloak its intransigence on arms reduction matters with sterile noble-sounding statements. Thus, Reykjavik might, in the long run, hasten the day when, in order to remain a respected member of the world community, Washington will have to end its obstinance and proceed with concrete actions to meet Moscow halfway on these issues.''

The Novosti commentary, sent by telex to Western correspondents, seemed optimistic that agreement is eventually possible.

''Yes, the meeting stumbled, but this does not mean that it completely failed,'' wrote Alexeyev. ''It also does not mean that such an unfortunate outcome of the top-level dialogue precludes the possibility of future progress in arms limitation and reduction endeavors or bars the continuation of such encounters.''

In a nationally televised speech Monday night, Reagan said the invitation to Gorbachev to visit the United States this year still stands, and ''we continue to believe that additional meetings would be useful.''

Reagan also said that American negotiators in Geneva ''are prepared to go forward whenever and wherever the Soviets are ready.''

Radio Moscow said in an English-language newscast today that Reagan ''tried to justify his refusal to make a compromise on the SDI issue by claiming that the program holds the key to a world without nuclear arms.''

It said that his ''stubborn striving'' to prove himself right over SDI had led unidentified analysts to question his willingness to reach arms control accords.

None of today's Soviet newspapers commented on the outcome of the summit, limiting their reports to Gorbachev's news conference held in Reykjavik Sunday night and a roundup of reaction from abroad.

Most of the reaction quoted from foreign media and officials was favorable to the Soviets and critical of the American refusal to agree to Gorbachev's demand that testing and research on space weapons be confined to laboratories for the next 10 years.

Alexeyev called the Soviet stand at Reykjavik ''conciliatory and flexible,'' citing as an example Gorbachev's readiness to accept Reagan's ''zero option'' to scrap all superpower medium-range missiles in Europe and limit warheads on medium-range missiles in Asia to 100 for each superpower.

Reagan and Gorbachev virtually agreed on this plan and to a proposal to reduce strategic nuclear weapons by 50 percent over five years, and scrap them completely by 1996.