There are some good Apple Support articles about startup issues, but which one to read depends on your operating system and model.
For example, if you are running 10.1-10.4, this one is good: Resolve startup issues and perform disk maintenance with Disk Utility and fsck
Here's one for 10.4-10.6: Mac OS X: Gray screen appears during startup (I know the apple logo is showing up for you, but good things to try anyway).
If you decide to run fsck as mentioned in the first article, be sure you read this article first: Mac OS X: How to start up in single-user or verbose mode
Regardless, are you in fact running a late 2009 iMac? If so, it's an Intel mac, and you're in the wrong room. You'll want to move your post to the Intel iMac community which has more active users. Remember to post your OS.