Only to share my experience:
After upgrade to iOS5 I had to play a while with GSM connection. My mobile operator is T-Mobile HR. Although it is supposed to setup APN automatically according to my SIM card setup, it did not happened.
I had to go Settings / Mobile data / APN setup and enter for APN: "web.htgprs"
(In the same section is PIN setup)
Re iPhone 3g
Funny thing is that (still) I cant find Mobile data section in Settings for iPhone. But what helped is: I turned automatic network off search for T-mobile, connect and then turned automatic back to on. Somehow, this time it reads correct setup for APN and my data connection started.
However - still mistery where Mobile data is? For example where to setup data roaming on iPhone?
On iPhone - SIM PIN setup is in Phone settings Tab.