I would recommend reading this article and following step by step (including the tools). I wasn't able to solve the issue by any of the other answers of this thread until I read the article.
How to solve connection problems concerning Windows Update or Microsoft UpdateHow to solve connection problems concerning Windows Update or Microsoft Update
The article includes a Connection error code list, download links to the tools, CMD commands, etc. for Windows XP, Vista, 7, 8 & 8.1. It's really complete. I was able to solve my issue with it.