How does it come that programs like TeamViewer can communicate without any problem on port 80, but it is not possible with VNC? Are there any free and open alternatives to VNC that can do this, too?
Each port can only be used by one application, so make sure the port is not in use by an other application (like Teamviewer or a HTTP server)
What VNC application are you using?
Simple, VNC is (or was) designed years ago for (technical) administrators to get on to their own machines, the sort of people who have no problems in setting up ports.
Team Vviewer on the other hand, whilst it can do more, is designed for anyone non technical to connect to anyone non technical.
There is nothing stopping you from hosting VNC on port 80 on your machine (as long as no web servers or anything else that uses it has attached to it).
However, also remember, Team Viewer does not actually attach to port 80.
You can only have one program attached to an incoming port on your computer, however, your computer can have as many outgoing connections to identical ports as it needs.
Port 80 is usually unblocked in most places with internet access, therefore outgoing connections are not a problem, even if it is a place that would not usually allow a service to be hosted.
Team Viewer works by issuing
You can test this through some VNC distributions, for example, a standard VNC distribution allows you to have a server (with an incoming port set up), and then someone wanting to connect in will simply establish an outgoing connection (no set up required), to the server.
On the other hand, you can start the VNC server as normal with no ports set up, launch the VNC listening client (and set up an incoming port), then from the server icon, right click and choose
Now, Teamviewer is basically both ends using an outgoing connection to a third party - therefore it requires no set up.
I hope I have answered a few of your questions, if I haven't or you want to know more on anything, please let me know.
FYI- I used to use Ultravnc
If you must use vnc over port 80 here's a how to using a java applet: http://ubuntuforums.org/showthread.php?t=107503. This is for the linux side of things. This post reports that realvnc can run over port 80: http://forums.whirlpool.net.au/archive/513251. Previous statements about outbound connections for teamviewer are correct, but if you're trying to get past a non-packet inspection firewall one of these might work for you.
This does not resolve inbound connections being required, only port number issues.
I like to use ssh port forwarding when using VNC: http://fclose.com/b/638/ . VNC isn't safe as we all know. If only port 80 is open (in case 22 is not open), sshd can configured to listen on port 80 and then after a tunnel is set up, lots of things can be done.