President Obama said those nations had been seen to "fan the flames of military conflict" in the North African country.
Libya has been in turmoil since the removal of former leader Muammar Gaddafi in 2011.
There are two rival governments and numerous militia controlling their own patches of territory.
Divisions have emerged among Gulf nations on Libya, with the United Arab Emirates (UAE) reportedly bombing Islamist targets in Libya and Qatar expressing reservations about such operations.
But Mr Obama said the crisis in Libya, where Islamic State has built a presence, could not be ended with "a few drone strikes or a few military operations".
"We're going to have to encourage some of the countries inside of the Gulf who have, I think, influence over the various factions inside of Libya to be more cooperative themselves," Mr Obama told reporters.
"In some cases, you've seen them fan the flames of military conflict, rather than try to reduce them."