Former president Jimmy Carter, ending a six-day visit to Israel, said tonight that the situation in the Middle East had "retrogressed" during the past two years and that "time is running out" for a solution to the Arab-Israeli conflict.

At a news conference, Carter said that the Israeli government has not lived up to commitments made at the 1978 Camp David peace conference and that Prime Minister Menachem Begin had applied a far narrower definition of autonomy for the Palestinian Arabs than either Carter or the late Egyptian president Anwar Sadat envisaged at the time of the signing of the Camp David accords.

But Carter held out hope that if Jordan's King Hussein agreed to join peace talks now, then the Begin government would make concessions on the autonomy issue and in its drive to expand Jewish settlements in the occupied West Bank and Gaza Strip, the avowed purpose of which is to prevent the territories from ever coming under Arab sovereignty.

The former president toured the West Bank today, visiting both Jewish settlements and Arab villages. He said he was not surprised by the extent of settlement in the territory but that it was "discouraging."

The Camp David peace accords are generally regarded as Carter's greatest accomplishment as president. While they led to the signing of the Egyptian-Israeli peace treaty in 1979, virtually no progress has been made on the other aspect of the agreement--the plan for an interim period of autonomy for the Arabs of the West Bank and Gaza Strip and negotiations on the "final status" of the territories.

Carter said progress on the autonomy issue has been inhibited both by the refusal of Hussein and the Palestinians to join peace negotiations and by the "narrow definition" of autonomy and the "lack of generosity" offered to the Arabs by the Begin government.

The former president reiterated his support for President Reagan's Middle East peace initiative as fully consistent with the Camp David accords.

Carter's visit here touched off a number of demonstrations by Palestinian Arabs protesting the Camp David autonomy formula, including an incident today in which an Arab youth was shot in the leg by an Israeli soldier after stones were thrown at an Israeli Army patrol in Jerusalem's Old City.