A terrorist bomb exploded in a crowded open-air market here yesterday, killing two persons and injuring 47, Israeli officials suggested the attack was timed to mar preparations for Vice President Mondale's visit, which begins today.

The Palestine Liberation Organization, in a statement issued in Beirut, claimed responsibility for the explosion and said it "emphasizes the PLO's determination to escalate the armed struggle against our Zionist enemy from within."

Israeli Prime Minister Menachem Begin, meeting with West German Foreign Minister Hans-Dietrich Genscher when the blast went off, reportedly told Genscher, "This is the sort of thing we can expect to occur regularly if a Palestinian state is established."

Since the Lebanese border was effectively sealed off following the March 14 invasion of Lebanon by the Israeli army, the likelihood has grown that terrorist attacks will be mounted by guerrillas based inside Israel.

While there has been an increase in the number of bombings and discoveries of undemoted bombs, there has been only one guerrilla attack from outside Israel's borders in recent months.

Yesterday's mid-morning explosion sent shards of galss and chunks of concrete flying into the Machaneh Yehudah public fruit and vegetable market near the center of West Jerusalem at at time when it was crowded with Jewish families shopping in preparation for the Sabbath.

Police theorized a timed explosive had been hidden in the building housing the market.

The market, scene of earlier terrorist bombings, was littered with vegetable crates and pieces of rubble as 12 ambulances and three medical teams rushed into the area.

Authorities said most of the injuries were slight but 16 persons were hospitalized.

Machaneh Yehudah is one of several spots in Jerusalem favored by the PLO for planting bombs.

The bombing s usually occur near sundown on Fridays when the streets are crowded with Israelis headed home for the Sabbath. Defective bombs have been found hidden in fruit bins and inside watermelons at Machaneh Yehudah.

Genscher, who is here on a state visit, later visited Jerusalem Mayor Teddy Kollek to extend his sympathy for the victims. Kollek told Genscher that terrorism is common to both Israel and West Germany, and he warned that if any country yields to the demands of the terrorists, the incidents will become worse.

Yesterday's bombing was the first since the mortar shell with a timing device exploded on a bus crowded with students returning home for the Sabbath in the first week of June. Following that bombing, Israel raided a PLO coastal base in southern Lebanon, but officials said the raid was to head off a guerrilla attack in Israel and was not connected with the bus bombing.

On March 11, following a guerrilla attack on a tourist bus near Tel Aviv, Israeli forces invaded southern Lebanon in an attempt to drive the PLO north and destroy their permanent bases. The Israeli army withdrew the last of its troops on June 13.

While such attacks by Palestinian terrorists based outside Israel have frequently resulted in reprisal raids, bombings by PLO operatives based in the occupied West Bank usually are not followed by reprisal by the Israeli army.

Mondale's visit will be the first by a U. S. vice president. Jerusalem already is bedecked with Israeli flags and the city has been caught up in a festive atmosphere in anticipation of the visit.

Although Mondale's visit is described as largely ceremonial - to mark the 30th anniversary of Israeli's independence - the vice president reportedly will seek to learn the limits of Israel's objectives in case a new round of face-to-face negotiations with Egypt gets under way, soon.

Israeli officials said that while the bombing will probably increase consciousness about security for the vice president, no protective arrangements will be made that had not already been decided upon. About 3,000 police and army personnel reportedly will be responsible for Mondale's security.

Mondale is expected to meet with President Yitzhak Navon, Begin and parliamentary speaker Yitzhak Shamir. He is also to meet with Foreign Minister Moshe Dayan, Defense Minister Ezer Weizman and other top government officials.

After leaving Israel next week, Mondale is to meet briefly with Egyptian officials in Alexandria.

A potential diplomatic flap over Mondale's scheduled visit to the Wailing Wall in the Old City was apparently averted when Kollek said he would accompany the vice president into East Jerusalem.

Since 1967, U. S. officials have gone to East Jerusalem without an Israeli escort because the United States does not recognize Israel's sovereignty over territory captured in the six-day war that year. But Kollek had insisted on escorting Mondale.

Mondale announced Wednesday he would make a "personal visit" to the wall and would invite Kollek to go along as a "friend."

Kollek said yesterday on Israel radio that he viewed the compromise as a recognition of a united Jerusalem, adding, "neither he (Mondale) nor I are particularly private persons . . . .It won't be a private business whatever you call it."