Note: This behavior does not apply to TeamViewer 9 (or later).
TeamViewer waits several minutes after windows-start until it tries to listen on Port 80 (if this Port is not taken by another application). If your application has not taken the Port within that time-frame or the application has not started automatically, TeamViewer might have taken the Port.
You can disable this behavior in TeamViewer version 5.1 to 8. Simply open the TeamViewer options under Extras > Options > Advanced. Enable the option Don't use incoming port 80 (recommended for web servers only) so that TeamViewer won’t try to take the Port again.