You're doing everything right with going to Gymboree and the library. Keep that up. It will get better soon enough. It is a phase. My son was like this too and we attributed it to the fact that it was just me, him and dad here - no grandparents and extended family.
Now he is the most outgoing child. I started him in preschool right before age 3 and he transitioned so well, while so several of the other kids clung and cried. I was amazed but I had done my best to get him in social surroundings as much as possible. You have to get out there and start making friends for him and for yourself.
Best advice is to get your son out with other kids at least a couple more times a week. We joined 2 moms groups. I would definitely suggest that - it was a godsend! Set up playdates with some of the Gymboree moms if you can or meet at a park. Push yourself to be more sociable and he'll follow your lead.
Invite neighbors over just to chat so he is used to more people too. Host weekly playgroups at your place if need be as he will feel more comfortable with that. Eventually he should warm up to others and you'll bring him out of his shell.