Connection to capitol without port

From the map, it looks like your water route goes north from the city near your capitol, around the northwest peninsula, then hugging the west coastline, swinging around the city-state at the southwest peninsula, and then into your other harbor.

The trouble is that you haven't explored a sea route through uncontrolled areas. Your "invisible trade ships" aren't willing to go into unexplored water to connect your empire together, and aren't able to go through territory that belongs to someone else. Looking at the map, the city-states in the northwest and southwest of your known territory might cut off the straight-water-route between your two harbored cities; the gray civilization (Germans?) to the west of your capitol might also be a problem, if they own all of the water tiles you might go through. You either need to make nice with those two city-states and the gray civilization, or invent Astronomy and expand your knowledge of the Ocean tiles with a Caravel so that your trade can route around the hexes claimed by the blocking city-states and civilization.

Alternatively, you can found a city just east of the labeled city-state in your map, on the water, and put a harbor there. Then your "invisible trade ships" just need to cross a short bay instead of navigating the long way around the continent. (This will depend on whether the city-states to the south and southeast of your capitol own all of the sea hexes on the south end of that bay. You may need to buy a couple of sea hexes quickly to make sure the city-states don't block your access later.)