Did you try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again? You will not lose data by resetting, but it can cure some glitches.
More suggestions here:
iOS: Troubleshooting Wi-Fi networks and connections
Translated by google:
Você tentou redefinir o telefone, segurando o botão do sono e repouso por cerca de 10 seg, até que o logotipo da Apple vem de volta? Você não vai perder dados, redefinindo, mas pode curar algumas falhas.
Mais sugestões aqui:
iOS: resolução de problemas relacionados com redes e ligações Wi-Fi