He was driven through the ruins of Gaza City's Shejaiya neighbourhood and the nearby Jabaliya refugee camp, the scenes of some of the heaviest Israeli shelling in summer's conflict.
Tens of thousands of Palestinians were displaced by the destruction, and today people camping outside their ravaged homes were seen waving at the convoy of white UN vehicles as it passed.
After meeting members of the newly convened Palestinian consensus government, Ban told reporters that the devastation he had seen was far worse than that caused in the previous Israel-Gaza conflict of winter 2008-2009.
"I'd like to take this opportunity to express my deepest condolences to people who lost their lives... And loved ones," Ban said.
Also Read
Ban, who last visited the territory in 2012, said at a donor conference in Egypt on Sunday that his trip to the Palestinian enclave was "to listen directly to the people of Gaza".
At the Cairo conference, Ban said "the root causes of the recent hostilities" were "a restrictive occupation that has lasted almost half a century, the continued denial of Palestinian rights and the lack of tangible progress in peace negotiations".
"I'm asking the leaders of both parties... To resume their talks," he said. "Otherwise it's a matter of time that the violence will continue.