Hmmm, the interesting thing about the Gallipoli assault was that the British and French Navies had already won. They had defeated and passed all 4 pairs of forts protecting the Dardanelles, and only lost when a Turkish minelayer laid the last of the Turkish supply of mines behind the Allied ships and 6 battleships were lost in the course of a single day. The admiral running the show then lost his bottle - despite over 20 battleships being committed to the attack, and the attack already having been won.
Also don't forget these were pre-Dreadnaught ships. Used for land bombardment because they were considered obsolete for naval combat.
Since then we have had the most recent example where the USS Missouri was used to successfully bombard the Kuwaiti coastline in the gulf war.
The problem with land fortifications is that they are generally immobile. If you have a really big fortress the Navy will generally just dodge around it. The only time this becomes a problem is when the fortress is protected a choke-point like the Dardanelles. But then the Navy has an advantage and it is called concentration of force. If the Army builds a fortress 10 times more powerful than a ship, then the Navy just brings 20 ships. Und so weiter. This is also why the US Navy is currently all powerful. There are plenty of nations which could stand up to 1 Nimitz Class carrier, but if that becomes a problem the US just brings 8!