hi there, had exactly the same problem with galaxy tab 2 and galaxy s4 and galaxy y.
unplug any ethernet lan cables from your router.
switch off your tablet or device and back on - should connect to wifi and work with internet.
plug in your ethernet cables
if not this then refer back to...