Mahmud Assaly, director of Beit Lahiya hospital, said the people were killed when tanks opened fire on several houses early on Wednesday.
Attaf Hamad, a witness, said that tank shells struck and demolished at least four houses in the attack.
More than 40 people were reportedly injured, including seven children and four women, the Palestinian health minister and witnesses said.
"It is the saddest scene and images I have ever seen. We saw legs, we saw heads, we saw hands scattered in the street," Hamad told Reuters.
"I saw people coming out of a house covered in blood. I started screaming to wake up the neighbours."
Israeli officials appologised for the deaths, amid conflicting reports that Irsael had ordered a temporary halt to the shelling of Gaza.
In the occupied West Bank, Israeli troops shot dead four armed Palestinians and a civilian early on Wednesday, Palestinian security sources said.
An Israeli military spokeswoman said troops had opened fire during an operation to arrest wanted Palestinian fighters in the village of Yamoun, near the northern West Bank city of Jenin.
Ismail Haniya, the Palestinian prime minister, asked the UN Security Council to meet to discuss the killings.
"I call on the Security Council to hold an emergency meeting to stop these massacres against the Palestinian people in Gaza and the West Bank," the Hamas leader said.
Parts of Beit Hanoun were left in ruins once the army withdrew
In a huge demonstration outside the mortuary at the Kamal Adwan hospital in the northern Gaza Strip, Nizar Rayan, a Hamas leader in northern Gaza, told the crowd: "We are going to fight against the so-called Israel. We are going to launch our rockets, our martyrs are going to sacrifice their lives in the depths of our occupied land.
"They will strike in Jaffa, in Haifa, inside Ashdod. The battle will continue. The rifle is not going to be set down. All of us are martyrs in waiting. Revenge is coming."
Other Hamas leaders have also called for bombings to be carried out inside Israel in retaliation for the attack.
Israeli troops completed their largest military operation in Gaza in a year on Tuesday after killing 60 fighters and civilians in a week-long incursion in the Beit Hanoun area that Israel said was designed to stop rocket attacks on Israeli cities.
Soldiers killed eight Palestinians in separate incidents in Gaza on Tuesday.
Israel had pulled its forces out of Gaza last year after a 38-year occupation, however it has repeatedly raided the territory since one of its soldiers was captured there in June.