Yes, harbours do work, but there are a few things to bare in mind:
For a harbour to connect the owning city to your trade network it must be able to form a valid water path to reach your capital (if it has a harbour) or another city which has a harbour and is already part of the network.
You need a visible unbroken path of water tiles between harbours for them to form a link.
Harbours can be blockaded by enemy ships (including barbarians) being in the vicinity of the owning city. This stops them creating a trade link.
If none of these issues come in to play I would say you may have run across a bug, or possibly have a mod installed that is interferring in some way.
**This doesn't come up often but I have discovered that it is impossible to establish trade networks if you do not have roads researched. (Happened to me while playing on islands)