iMac Will not Recognize its HDD I have been using a late-2009 iMac (21.5") (it was running the latest pre-Sierra update, I do not remember the exact OS version) for somewhere in the area of six months now and have, overall, had no issues with it. However, two weeks ago, it failed. The story surrounding this apparently sudden failure is that I was running an update of Safari that involved needing to do a restart. Immediately after doing the restart, the electricity for our home went out, it was only out for around a minute. Luckily the computer was plugged into a surge protector... Or not.

Later that day, when I tried to turn it on, it turned on but wouldn't boot passed the Apple Screen with the small, gray progress bar. 

It is still basically in that same state. However, after some reading on the internet and trying a variety of things booting to "Command+S" as well as "Command+R". What happened when I ran "Command+R" was somewhat depressing. The Mac is completely unaware of the fact that it has a 500GB Western Digital HDD in it (which I can hear turning) and if I run Disk Utility, it will spend hours looking for that drive.

What I tried today was reinstalling the OS (failed), booting it with SpinRite and booting it from a 64GB external drive (worked). Once I booted to the external drive, I ran disk utility which I started at around 1400 hours, it is now 1500 hours and it just now found its hard drive. A warning popped up and indicated that the drive could not be repaired. I am now running First Aid on it, just curious to see what if anything it can do there. 

I do not totally know what my question here is. Other than, if what I am trying right now doesn't work, what should I do? Should I just give up and drag the thing to an Apple Store? I have data on it that I must recover (sadly I had nothing backed up).

To Summarize: If what I am doing right now doesn't work, what - if anything - can I do next? Are there any other at-home fixes I can try before taking it to an Apple Store? 

Note: I own one other Mac that is exactly the same as the one that is not working, I also own portions of 38 other older Macs and part of a broken one that is also this computer's twin. (I added this in case anyone recommends any form of testing, or needing certain parts).
I just had a hdd fail in my imac last week. So I know this method works:

Get all important files off of the hdd with Lazesoft Mac Data Recovery. You'll have to copy the files to another disk. If you have enough space, the one you used to boot with might be enough. It takes a LONG time to copy files off of a disk that will not mount in the OS! Be patient.

From there it's up to you. Personally I'd replace the failed drive. If it failed once, it will fail again. But if you have the luxury of time and patience, you can try to erase/reformat it yourself then copy the files back... hope for the best.

Otherwise, take it to Apple. They'll replace the drive and copy the data for you (if possible). They'll also break your bank =) They won't even give you a price over the phone!

I went with UBreakIFix. $100 got the replacement done. But I had to copy the files myself as described above. Also they didn't do the jumpers right so the fans come on at 100% until I put in a software solution to fix that. A lackluster experience for sure. But if you go in there with the knowledge of the SMC/fan situation, they'll probably set it up correctly for you.