I just had a 1TB Western Digital Black start to die on me, ironically it was a warranty replacement for another one that did the same thing. I had my drive in an external enclosure and only powered it on and connected it when needed, but I've had that drive for a while now, so I guess age + wear and tear finally caught up.
This may sound like bro-science but all I did was keep it plugged in, lay the enclosure flat instead of standing it up on its side, and eventually the drive was recognized. I used Western Digital's diagnostic tools and of course everything came back fine. I bought the cheapest/biggest SSD I could find and simply created an image of that hard drive onto the SSD.