Speaking the day after US warplanes hit militants in Iraq, Obama said it would take more than bombs to restore stability, and criticized Prime Minister Nuri al-Maliki's Shi'ite-led government for failing to empower Sunnis.
"I don't think we're going to solve this problem in weeks. This is going to take some time," Obama told a news conference in Washington.
Islamic State has captured wide swathes of northern Iraq since June, executing non-Sunni Muslim captives, displacing tens of thousands of people and drawing the first US air strikes in the region since Washington withdrew troops in 2011.
After routing Kurdish forces this week, the militants are just 30 minutes' drive from Arbil, the Iraqi Kurdish capital, which up to now has been spared the sectarian bloodshed that has scarred other parts of Iraq for a decade.
- Report: US said to bomb ISIS targets in Iraq
- Jordan, Israel cooperate in face of ISIS threat
- ISIS crisis has more chaos to spare
The US president said Washington would continue to provide military assistance and advice to Baghdad and Kurdish forces, but stressed repeatedly the importance of Iraq, which is a major oil exporter, forming its own inclusive government.
Maliki has been widely criticized for authoritarian and sectarian policies that have alienated Sunnis and prompted some to support the insurgency.
"I think this a wake-up call for a lot of Iraqis inside of Baghdad recognizing that we're going to have to rethink how we do business if we're going to hold our country together," Obama said, before departing on a two-week vacation.
Employees of foreign oil firms have been leaving Arbil, and Kurds have snapped up AK-47 assault rifles in arms markets for fear of imminent attack, although these have proved ineffective against the superior firepower of the Islamic State fighters.
Given the Islamic State threat, a source in the Kurdistan Regional Government said it had received extra supplies of heavy weaponry from the Baghdad federal government "and other governments" in the past few days, but declined to elaborate.
In their latest advance through northern Iraq, the Islamic State seized a fifth oil field, several towns and Iraq's biggest dam, sending tens of thousands fleeing for their lives.
An engineer at the Mosul dam told Reuters that Islamic State fighters had brought in engineers to repair an emergency power line to the city, Iraq's biggest in the north, that had been cut off four days ago, causing power outages and water shortages.
"They are gathering people to work at the dam," he said.
A dam administrator said militants were putting up the trademark Islamic State black flags and patrolling with flatbed trucks mounted with machineguns to protect the facility they seized from Kurdish forces earlier this week.
The Islamic State, comprised mainly of Arabs and foreign fighters who want to reshape the map of the Middle East, pose the biggest threat to Iraq since Saddam Hussein was toppled by a US-led invasion in 2003.
The Sunni militants, who have beheaded and crucified captives in their drive to eradicate unbelievers, first arrived in northern Iraq in June from Syria where they have captured wide tracts of territory in that country's civil war.
Almost unopposed by US-trained Iraqi government forces who fled by the thousands, the insurgents swept through the region and have threatened to march on Baghdad with Iraqi military tanks, armored personnel carriers and machineguns they seized.
The US Defense Department said two F/A-18 warplanes from an aircraft carrier in the Gulf had dropped laser-guided 500-pound bombs on Islamic State artillery batteries. Other air strikes targeted mortar positions and an Islamic State convoy.
Obama has said this was needed to halt the Islamist advance, protect Americans in the region as well as hundreds of thousands of Christians and members of other religious minorities at risk.
US military aircraft dropped relief supplies to members of the ancient Yazidi sect, tens of thousands of whom have collected on a desert mountaintop seeking shelter from insurgents who had ordered them to convert to Islam or die.
Highlighting their predicament, more than 300 Yazidi families in the villages of Koja, Hatimiya and Qaboshi have been threatened by death unless they change religion, witnesses and a Yazidi lawmaker told Reuters on Saturday.
Following the US example, Britain and France also pledged on Saturday to deliver humanitarian supplies to people trapped by the militant advance.
British Foreign Secretary Philip Hammond said London was especially concerned by the fate of Yazidis who are cornered in their ancient homeland of Sinjar in mountainous northern Iraq.
"We are more widely looking at how to support this group of people and get them off that mountain," he told the BBC.
The Islamic State's campaign has returned Iraq to levels of violence not seen since a civil war peaked in 2006-2007 during the US occupation.
The territorial gains of Islamic State, who also control a third of Syria and have fought this past week inside Lebanon, has unnerved the Middle East and threatens to shatter Iraq, a country split between mostly Shi'ites, Sunnis and Kurds.
The semi-autonomous Kurdish region has until now been the only part of Iraq to survive the past decade of civil war without a serious security threat.
Its vaunted "peshmerga" fighters - those who "confront death" - also controlled wide stretches of territory outside the autonomous zone, which served as sanctuary for fleeing Christians and other minorities when Islamic State fighters stormed into the region last month.
But the past week saw the peshmerga crumble in the face of Islamic State fighters, who have heavy weapons seized from fleeing Iraqi troops and are flush with cash looted from banks.