At first pay attention that "Day" means "a period", whether that period is a year or a hundred years or a million years or billions of years, and there is evidence to prove this,for example:
Qur'an repeatedly used the word "Day" for the long term, such as "Yom Alqyamh" which takes at least fifty thousand years.
Then God's power is infinite. Whatever He desires to do, He does it, and whatever He does not desire to do, He does not do it. Nothing falls out of the premises of God's power and command. Without doubt, God's creation of the universe in six days or six stages does not in any way negate the infiniteness of His power. Never does it imply weakness or deficiency on the part of God, the Exalted. In other words, it is not impossible for God to create the world in an instant.
However, the universe operates on cause-and-effect system and God does not want to make things run against the rules which pervade and permeate the entire universe.(Cited from Collection of Works by Ayatollah Mutahhari,vol:1,pg:408 (Majma'ul Bahrain, the word 'Sabab'))
It is for the same underlying reason that God created the world in six days. In fact, we know that this gradual creation is owing to the characteristic of the universe itself not because He was not able to create it instantaneously.
Conclusively, if the Qur'an says that God created the universe in six days, it does not mean that God's action is gradual and that the creation took place in a gradual way, nor does it mean that God could not create the universe at once and as a whole because He needed time to pass. Such an assumption in regards to God's essence is completely wrong. In fact, gradualness is an essential quality of the creature not of Creator.