First step, open up your case, and make sure the SATA (likely - might be IDE if older) cable connecting the drive to the MoBo and the power cable connecting the PSU to the HDD are both solidly connected. Sometimes, the connection is shaky, and particularly if you moved your computer or took off the side panel recently, it could have moved a bit and caused this problem.
If you're CERTAIN this has nothing to do with the cables, then we can move on...