Did torpedo boats only become viable as fast attack craft in the missile era?
Short answerNo. In the world wars they were already viable as a massed, affordable defensive threat to larger ships.
NotesTorpedo boats were viable in both world wars as an affordable defensive threat. An enemy entering defended waters could face dozens of small attackers and had to weigh the possible losses among its larger ships. The defending navy could replace these small craft comparatively cheaply. Their value depended on what they were expected to achieve, including deterring an approach as well as making offensive attacks.