Guys, I had this again last night.
A friend was trying to get in to my lounge but kept getting the error. He then created his own lounge and I tried to enter. Each time we got the 774 error. I think I must have tried at least 10 times in total.
Now remember my PS3 is in a DMZ.
So, I brought up the XMB and checked my network settings. I noticed that uPnP was listed as not available. I then logged in to my router on my lap top to check the settings, uPnP was enabled in the router settings.
So, I quit GT5, went back to network settings in the XMB and re-connected to my network from scratch ensuring that uPnP was switched on. This all took no more than 2 minutes to complete.
I ran a connection test, it confirmed uPnP was available.
I fired up GT5 again, went straight to community and tried to join my friends lounge fully expecting to get the 774 error again. But no, I went straight in, not a problem. We played online for over 2 hours. I left the lobby and came back several times to add a few extra cars to my favourites list, do an oil change etc. Each time I reconnected without a hitch.
Now I cannot be sure that fixing the uPnP availability actually fixed the error as I obviously had to disconnect and then reconnect to the GT servers by virtue of quitting the game to amend the network settings. It is worth a try though if you are experiencing this issue.