An AFP correspondent on the Gaza side of the Erez crossing from Israel said a crowd of around 50 people, many of them relatives of Palestinians held in Israeli prisons, threw objects at Ban's car as he drove past them.
The demonstrators were protesting what they called Ban's refusal to meet with them to discuss the situation of Palestinian prisoners in Israeli jails.
Some held signs in English reading "Ban Ki-moon, enough bias for Israel."
Ban's convoy, briefly held up by the demonstrators, was able to continue past the protest and onwards to Khan Yunis, where the UN chief is scheduled to visit a school and a Japanese-funding housing project.
The top diplomat is visiting Gaza as part of a trip to Israel and the Palestinian territories intended to help kickstart stalled negotiations.