Sounds as if the wifi radio in the phone went bad. Put the phone up on the router (actually lay it on the router) and see if it shows the signal. (Just for the info, as you'll see.) If it shows the signal, the antenna is disconnected (inside).
In any case, the phone is under warranty. have it fixed or replaced. (Make sure you have
everything backed up to some other decide, a cloud account, somewhere. (Your Google email is backed up on the server, as is just about any other email. Your Google contacts [edit them to see if they were entered ad Device, SIM or Google (or Account) contacts] are backed up at
Google Contacts, Calendar is backed up at
Google Calendar, your apps, if you want to take the time to download them again, are backed up at the Play Store [or you can back them up with an app like
Helium - definitely use Helium to back up any data the apps save] in case they decide to replace the phone or do a factory reset brfore working on it.)
(That's why finding out if the problem is a disconnected antenna is just for your knowledge - it'll get fixed regardless. If it's just a disconnected antenna, it's a 5 minute fix. If it's a bad wifi radio, it's another phone - yours gets sent back to HTC. The carrier usually won't eat the labor to fix the phone.)