Do you have type of anti virus or other monitoring apps that might be blocking Internet access?
Try holding the shift key when booting to get to safe mode and see if that fixes it. If it does, that tells you you have a startup or login item running that is causing this.