Yes, submarines managed to sink a few battleships when they had the element of surprise on their side. As soon as anti-submarine tactics adapted, the battleships were again reasonable safe against torpedo delivery systems. (Even in the 1890s, battleships had been vulnerable to torpedo boats, a challenge surmounted by the adoption of secondary, quick-firing armament.) It was only with the arrival of strong naval aviation that battleships lost their supremacy.