Politicians Brian Baird and Keith Ellison, the first Muslim elected to the US congress, also visited Gaza in the first visit by US congressmen to the Strip for four years, and helped out volunteers at the UN relief agency, Unrwa, in Zeitun.
None of the three were expected to meet members of Hamas.
Ahmed Yousef, a Hamas official, welcomed the arrival of the Americans, saying: "We highly appreciate the visit of any delegation that wants to find out the facts and see what has happened on the ground in Gaza."
Meanwhile, Israel launched further air raids on the Gaza Strip on Thursday, which the Israeli military said were in response to Palestinian rockets fired at southern Israel.
No injuries were reported in the strikes on six tunnels in Rafah, near the Egyptian border.
Kerry, who inspected the ruins of a school destroyed in the Israeli offensive and toured a neighbourhood heavily damaged in the fighting, spoke to local residents.
Shaarhabel Alzeem, a prominent lawyer, told him: "We highly appreciate your visit here and hope you can talk to your colleagues and say that we want peace with Israel. But we also need to live respectable lives."
|Sporadic violence has continued since Israel withdrew its forces from Gaza [AFP]
Kerry replied: "Your political leadership needs to understand that any nation that has rockets hitting it for many years threatening its residents is going to respond.
"[Hamas] needs to make it clear how it is willing to move to make peace and those decisions have not been made yet."
As the head of the senate foreign committee, Kerry is a senior Democrat, but all three men were visiting the region in their own capacity and not as representatives of the administration of Barack Obama, the US president.
Hamas won elections in 2006 and consolidated control of the Gaza Strip in 2007.
Although Israel and Hamas declared unilateral ceasefires on January 18, sporadic violence has persisted amid Egyptian-brokered attempts to reach a long-term peace deal.