I agree with cboucher, Your Hard Drive is probably starting to fail.I am still having this issue after going through all the recommendations online. The drive works fine in a hard drive dock but when in a computer it will disappear at least once a day. This seems to happen when I am watching a video of some sort that is stored on that hard drive
Have you considered it could be a electrical circuit intermittent problem as this is the reason Diagnostics is not detecting any problems.
I have had many Hard drives fail due to the circuit board.
If you think it is OK in the dock leave it there.