Egypt and Israel today resolved a two-month dispute in which diplomatic sensitivities surrounding their peace treaty were blocking the hopes of about 5,800 Gaza high school students, who wanted to enroll in Egyptian universities.

The compromise, which also allowed Gaza students in Egypt to return home for summer holidays, marked only a small advance on the path to normal relations between the two former enemies. But it demonstrated the extent to which everyday human concerns, such as education and family visits, have been disrupted by Arab-Israeli hostility and how the treaty has created an atmosphere in which at least some of the concerns can be met.

The new atmosphere still has its limits, and it includes only Egypt and Israel. Palestinians seeking family reunions on the West Bank by traveling from Jordan, which has boycotted the treaty, still must obtain special permits and submit to timeconsuming and sometimes humiliating searches to cross into Israeli-occupied territory.

They can be seen almost any day at the Allenby Bridge crossing point on the sluggish Jordan River. Old women in traditional robes line up alongside smartly suited businessmen with cardboard boxes, suitcases and a variety of other parcels for inspection by stern Israeli soldiers. The process can take hours.

Palastinians living in Lebanon or Syria, which also oppose the treaty, often are prevented from visiting their relatives on the occupied West Bank. They talk of their ancestral Palestinian villages in emotional, faraway tones as a nirvana that may never be reached. Others, teenage boys mostly, make it into the Palestine they have heard so much about but never seen, only to die there at the end of a terror mission.

Under the Egyptian-Israeli compromise on Gaza, about 5,800 examination papers were handled over this morning to Egyptian authorities at El Arish on the frontier between Egypt and Isreali-held territory in the Sinai.

At about the same time, 15 Gaza students enrolled in Egypt crossed at the El Arish gate and headed for Gaza and reunions with their families. Several thousand Gaza youths studying in Egyptian schools plan to make such visits this summer, an Israeli spokesman said.

Gaza high school students took the examinations as usual at the end of May, with those who pass earning the right to study in Egyptian universities under rules dating from the Egyptian administration of Gaza from 1948 until 1967. Since Israel occupied Gaza in the 1967 war, the United Nation Educationsl, Scientific and Cultural Organization administered the tests, transported them to Cairo for grading and returned to Gaza to hand out the results each year.

This year, however, Israel insisted that UNESCO's role was out of place since peace had been concluded with Egypt. Gaza teachers administered the exams anyway, but the papers were confiscated by Israeli military occupation authorities and held for safekeeping.

Egypt refused to accept the exams from Israeli authorities directly, insisting that the March 26 peace treaty calls for normalization of borders to that degree only after ambassadors are exchanged and more of the Sinai is returned to Egypt.

There it stood through the summer, with the Gaza students paying the price.

Israeli Foreign Minister Moshe Dayan felt so strongly about the dispute that he threatened in a newspaper interview Tuesday to resign if the examinations were not handed over directly, without UNESCO mediation, and if the Gaza students did not return for summer vacations directly, without Red Cross help as has been the practice.

Butros Ghali, the Egyptian minister of state for foreign affairs, held talks with Dayan on the problem during his visit for Palestinian autonomy talks in Haifa last Sunday, Monday and Tuesday. The two decided that the turnover could be made by the Palestinian mayor and political leader of Gaza, Rashad Shawwa.

Shawwa, however, bears allegiance to the Palestine Liberation Organization and refused to carry out the compromise role assigned to him by Ghali and Dayan. He said to do so would "enhance the process of normalization without ensuring the rights of the Palestinian people."

Despite a request from the Eqyptian foreign minister and a personal plea telephoned by Ghali, Shawwa held firm, saying he could not be seen taking part in gesture of normalization until the rights of the Palestinian people are guaranteed.

His stand reflected Palestinian opposition to the treaty, which calls for "full autonomy" on the West Bank and in Gaza but does not directly address the Palestinian demand for statehood.

As a result, the Gaza students in Cairo still could not come home for summer vacations with their families and the students who took their examinations in May still had not had their papers graded.

Confronted with the impasse, Egyptian officials relented and decided to accept the papers from the military occupation authorities. This still permitted Egypt to contend that the exams had not come from Israel directly and that it was not pushing normalization faster than the treaty schedule.

The Israeli occupation authorities assigned a Gaza Palestinian employed by the military governor as an education official to make the actual handover at El Arish. This permitted Israel to contend that it had been a Palestinian who cooperated in the step toward normalization ahead of the treaty schedule.

Shawwa agreed to the deal, but stayed out of it. This permitted him to contend that he had remained aloof from the peace treaty, according to PLO policies.

The students, meanwhile, were told that all the maneuvering meant their exam papers probably were arriving too late for them to enroll this fall in Egyptian universities, even if they pass.