My friend has had the same problem and asked me to help. I am leaving these instructions for people like myself who are not tech savvy! I am a piano teacher/musician! I had success finally after several days of stress. There are several things I did of which the final was a restore to factory settings.
The original start of all problems began after updating itunes and iphone 4 to IOS 5. Apparently something went wrong in the update. At first I thought it was a YouTube problem since that was the first thing I noticed did not work. I kept getting message that says "Cannot connect to YouTube". After waisting time on that error message trying different things, I realized that it was the push notifications and messages that said connect to iTunes to receive push notifications. It seemed to me that there must be a syncing problem. Then I had an understanding in my mind that all applications must go through iTunes. There must be a communication problem. After reading other forums, I found one Apple support page dealing with iTunes.
This was helpful. Here is the link:http://support.apple.com/kb/TS3125#1
My friend is a PC user. Here is a list of the things that I did before I restored to factory settings on her PC:
1) verified that the problem was not an internet or network problem by trying other applications and Safari.
2) Got rid of a lot of apps in sync process (NOT HELPFUL)
3) Changed Apple password and Youtube password. (Not sure, might have helped clear up some confusion)
4) ran the iTunes Diagnosics test 3 times (which by the way, I did not have on my Mac) I kept having a few issues and would try different things, I finally got a perfect run through, which told me that her problem was not hardware
5) CLOCK PROBLEM: One problem I found I had to fix to get test to work was her clock was not in sync with Apple/iTunes/ or Microsoft. When I tried to sync it in her Control panel, it told me RPC was unavailable and could not acces the internet. So I found this:
I would make sure that your RPC (Remote Procedure Call) server is running. Right click My Computer- >Manage and go to the services section. You start/stop services from here. You can also right click and select Properties.... and see the Dependencies of the service.
RPC was not running at all so I switched it to automatic by right clicking it. Then went back to the clock in Control Panel and synced it and voila it worked.
iTunes Diagnostics worked perfectly after that. However, the push notifications were not solved much to my dismay.
5) So I backed up phone again by right clicking on the iphone image when plugged in and tried to resore from an earlier backup form several months prior. DID NOT WORK.
6) My last option besides jail break-RESTORE
6a) It began the software download process which did not work. I tried this three times before getting it to work.
7) Figured that security must be blocking something even though iTunes is on the "accepted" list. Turned off firewall and disabled security for virus protection. Still the download was interrupted due to a wireless network problem.
8) plugged cable into computer to get best possible connection for download; it took 2.5 hours!
9) After download was complete it did not prompt me. I clicked "Restore" and it erased everything and restored to factory settings and then I restored to previous backup that was the last backup I had saved.
10) The phone worked!!!!!! Had to re-enter new passwords to get into youtube, and iCloud, etc. It has been a few days now and there have been no problems since!! YEA!!! Best wishes to you! Hope this helped.