This problem is a "by ass", there is no specific solution for this problem, so we suggest the following:
Make sure you use the correct version of firmware (2G or 3G depending on the model of your iPhone).
Restart your computer and try again.
Try other computers or different operating systems (Windows or Mac) .- Here is what worked for me.
Try other USB ports
Uninstall and reinstall iTunes.
You have your other solutions, please share them with us.