Are you currently in the UK or abroad?
Can you make calls and send texts?
Do you see a giffgaff or O2-UK logo next to the signal dots?
Do you see a connection symbol
(3G, 4G, H, E, gprs)
And if you switch to 3G from 4G it still fails to connect?
Mobile data options
Voice and data
And tick 3G
Complete these steps/checks
Switch off mobile data and 3G /4G and back on to reastablish the settings
Where it says
Use mobile data for
Check that all buttons are switched to on
And remove any vpn and data profiles
(go to the next step if you don't see a profiles tab)
And click reset network settings
The phone will switch off and restart automatically in a few minutes
(extra step if you have a O2-UK logo rather than a giffgaff logo)
Install this profile via safari with wifiHttp://j.mp/iphoneprofile
Switch on airplane mode and switch off
Now try and connect to a Web page via safari