I have found the issue to the problem and fixed it. Somewhere on the gmail settings or search on google for "gmail access less secure apps". When you find that, enable it and it works for the htc mail app.
Second is make sure imap and pop servers is enabled on gmail through the browser
Took...