First thing I would do is to pull the battery/SIM/SD card. Wait a few minutes. Reinsert all and restart. The main purpose being to re-seat all the cards' electrical contacts.
If that doesn't work, I'd pull the SD card, put it in an adapter and put it into my PC. Then, run a chkdsk on the card via the command line (i.e. chkdsk /f). Then, put it back into the phone and try again.
If even that doesn't work, I would remove the SD card and put it into the PC. Copy the entire contents off onto your hard drive. Then, format the SD card FAT32. Then copy everything back. Then reinsert into the phone and try again.
if none of that works the SD card should be covered under the phones 1 year manufacturers warranty from HTC.
I had mine say It was Damaged and could not format via the phone. I did what Frank suggested ( but completely by accident because I was so pissed off it was not working I just took everything out of it as a last resort and the SIM card pull reset the SD card) who would have guessed.... good luck