Obama came up with the warning while speaking to Prime Minister Benjamin Netanyahu on Friday, reports BBC.
The US president, however, has backed Israeli’s right to self-defence.
He said he was "deeply concerned" about civilian losses, with the Palestinian death toll now over 300.
UN Secretary General Ban Ki Moon will arrive in the region on Saturday to try to mediate between Israel and Hamas, UN political affairs chief Jeffrey Feltman said.
Ban's visit would aim to help Israelis and Palestinians "end the violence and find a way forward," Jeffrey said.
"Israel has legitimate security concerns, and we condemn the indiscriminate rocket fire from Gaza into Israel. But we are alarmed by Israel's heavy response," Feltman added.
Israel's ground operation followed 10 days of air strikes on Gaza, which failed to stop Hamas firing rockets across the border.
Meanwhile, Palestinian President Mahmoud Abbas has asked Turkey and Qatar to urge Hamas to accept the terms of an Egyptian-brokered ceasefire with Israel.
After a relative lull in clashes on Friday, there were reports of increased Israeli tank fire overnight and further air strikes early on Saturday morning.



