There is a nice website that maybe helpful for you: http://www.cultofmac.com/50685/how-to-fix-common-mac-startup-problems-macrx/
It says about the spinning gear:
Apple Logo with Spinning Gear
Once the spinning gear appears the BSD kernel (Darwin) has assumed command and begins loading device drivers. Shortly thereafter it transfers command to the almighty (and controversial) launchd process. Such are the workings of UNIX.
What this means for us mortals is that when a Mac stalls at the Apple logo or the logo with a spinning gear, it probably has a corrupt Mac OS X installation. It may also be having trouble accessing an internal or external hardware component, but this is less-likely.
Rebooting your Mac in Safe Mode can sometimes get things working well-enough that a second, normal reboot then works normally Hold down the Shift key at startup to boot in Safe Mode. DiskWarrior is also worth a shot (this is by far my most used disk utility). If that doesn’t work, an Archive & Install may be needed.
Hope this helps....