Thats kind of odd. Sounds like a phishing attempt, they try to trick you into giving up information or downloading something malicious by saying your phone is infected, just dont click anything on the page you were redirected to, if it does not happen again its probably nothing to worry about, I would run a scan with malwarebytes just in case.