I've had this issue in the past and the only way to fix it was to add the Teamviewer to the exclusion list in Firewall. Something happened and Teamviewer was added to blocking list. If you have a security suite installed, access its Firewall module and add Teamviewer as an exception. Eventually, you can disable the Firewall temporary to see if the problem is with the firewall.
Secondly, download and install a new version of Teamviewer or, if it's the latest one, perform a reinstall using the same version.
Also, reinstall your network adapters. It might sound as a last chance, but there could be problems with the network adapter as well.