can a blockchain ever get a 'virus', that continually replicates itself, continues paying for gas (if on the ethereum network) and survives/self-replicates through the blockchain, similar to viruses on a PC?
I don't think it is possible in the way you are describing it.
Even if there was a smart contract which replicates itself and pays transactions and stuff. The thing is, a smart contract cannot act by itself. There has to be a user who initiates the actions. Then the smart contract could send a few transactions, but only within the block where the user started the actions of the smart contract. And as far as I know are smart contracts not able to pay gascosts, so the user itself has to pay for it.
Transactions which send other transactions are executed within the same block. So every action only lasts for one block and the initiating user would have to start the contract over and over again. Additionally there is a limit of executed gas within a block. So the smart contract could only send a few transactions before the block is full and will cancel all further transaction calls.
Besides this initiation issue, I cannot imagine a way how a smart contract could harm people by itself. Only if some other users would send money there, these funds might be lost. But it would be obviously stupid to do so.
To avoid such circumstance Consensus mechanisms are used to find faulty nodes as some blockchains are permission-less and anyone can participate.And their is no guarantee that every participant is valid one.For simple nodes faults RAFT consensus mechanism can be used.For nodes which is acting maliciously Byzantine Fault Tolerance mechanism can be used to remove the faulty node from the network.