Chosen Solution
First is the system meeting your needs? If it is then its worth fixing! As to getting it fixed it does sound like the hard drive has a problem here. But, I also suspect something else is going on as the system shouldn’t shut down if the drive has died it would give you a blinking question mark on a folder icon as seen here: About the screens you see when your Mac starts up once it couldn’t find a bootable drive. While your system is out of warranty from Apple there could be something they are aware of that is covered under an extended warranty condition. I would first check that out as free is better than having to pay for a repair ;-} Carefully carry your system into an Apple Store or if you have an Apple authorized service center near you (you’ll need an appointment with Apple). Lets see if they can fix this. At worse they will charge you the labor cost (bench fee). Get an estimate first is they won’t cover it. Then think if you are willing to fix your own system. Here is the IFIXIT guide to replace the hard drive: iMac Intel 21.5" EMC 2544 Hard Drive Replacement You’ll need some tools and patience! But this is one of the easier repairs. Don’t forget I still think there is something more going on here! So this alone likely won’t fix things but you need to start with it.