President Reagan's effort to block completion of the Soviet gas pipeline to Western Europe will both fail and backfire by pushing the Russians into developing technological self-sufficiency in this field, West German Economics Minister Otto Lambsdorff said here yesterday.

Lambsdorff, who is here to discuss the issue with the administration and congressmen, told reporters that Reagan's decision on the gas pipeline was "politically dangerous."

"We are moving in a dangerous trend," Lambsdorff said, "from one sanction and one embargo to another. It goes on and on, and where do we end up? We end up with our system of open trade" in jeopardy.

Reagan has that he will extend to foreign subsidiaries of American companies and to foreign companies operating under U.S. license the same embargo on the use of American technology to build the pipeline that was applied to U.S. companies last year in response to the imposition of martial law in Poland.

The 3,700-mile pipeline project would ultimately supply 30 percent of Western Europe's gas needs and provide the Soviets with $10 billion in annual hard-cash revenues, it is estimated. These are among the administration officials give for its effort to block the pipeline, which Lambsdorff said came as a "big surprise" to Europeans.

Lambsdorff said Europeans had been bitter about and preoccupied with American efforts to block the pipeline. "I can't remember when Europeans paid as much attention to any issue as they have to the pipeline," he said. "I see it as a politically dangerous situation, the way we are shouting at each other."

Lambsdoff, who visited yesterday with Secretary of Commerce Malcolm Baldrige and was scheduled to see Secretary of State George P. Shultz and White House national security adviser William P. Clark, said it was foolish to expect the administration to "back off" the decision quickly.

"I think what we have to do is to sit down together and do some fact-finding, and then see what can be done to ease away from the decision," he said. "I'm totally against heating up the debate."

Lambsdorff said that "the only thing I'm sure of is what everybody in Europe is sure of, and that is that the pipeline will be built. . . . I am not a betting man, but I am willing to bet that the Russians will supply gas to us on the very first day they promised. You see, the Russians are saying, 'We'll show the U.S!'

"So in the long run, the pipeline will be built, and the Soviet Union will have made themselves substantially more independent in that field of technology," Lambsdorff said.

He said that another negative result for the United States would be decreased European dependence on it.

"I can tell you that German companies are thinking through their relations with American companies," Lambsdorff said. "It worries me, but what they are saying is, 'If we can't rely on American companies, we'd better become self-sufficient.' "