I was exactly the same which is one of the main reasons why i never had a gym membership, and then one day i thought stuff this Im going to join. So i looked at all the gyms around town, and decided on one that was close, had a great price and was a good environment. For that first week or two it was a bit intimidating- but the hardest part is overcoming that mental barrier that everyone is watching you- and guess what in reality everyone is so focused on themselves that they wont even notice you!
No one can motivate you but you! Maybe try doing a star chart and aim to go to the gym or a class three times or what ever you want and when you get 25stars or something reward yourself, maybe a new gym top or something. With the classes just go into one, introduce yourself to the instructer if you havent done it before and just get started- there really isint some magical panacea, the only way you will meet people is to go along and introduce yourself. Perhaps try a less intense class like aqua or aero to begin with as theres more time to talk than in balance or pump or attack.
best of luck- hope you brave up and get to the gym it really is worth it.