I just experienced this exact issue on Wednesday, August 1st. I was actually trying to optimize my hard drive with TechTool Pro (I do not recommend this), when my hard drive went bad. I ran a “verify disk” in my Disk Utility to find errors in my hard drive. I then proceeded to boot in recovery mode to “repair disk”, and was unable to do so. I basically had to reformat my hard drive.
Then, it happened - the dreaded error message 1004. I called Apple Support and spoke with an engineer. Apparently the error has nothing to due with a bad drive, but when I took it to the Apple store to get it fixed (still under warranty), they insisted that indeed it was a bad hard drive and now it’s in their possession as they’re replacing the hard drive. The common denominator based on what I’ve read thus far is that I had Lion installed when this all happened.
Although contradictory diagnosis, it seems that it has to do with a server side issue on Apple’s end. I have not been able to confirm as of yet. I’m getting a new hard drive out of this experience, which I guess isn’t so bad.
In conclusion, it seems to happen with Lion after reformatting the hard drive and trying to reinstall Lion from recovery mode. Error 1004, please try again later.