I used to work in a gym, great way for him to exercise and work on balance, etc. Will they either let you out on the floor with him to encourage or help or else let you leave so he cannot see you. I mainly coached birthday parties and summer camp, but pretty much grew up in the gym for my own practices. For parties parents were allowed on the floor since they were short, but usually unless it was for a 2-4 year old most of the parents watched from somewhere else or dropped their child off. Some of the younger ones dropped their children off too. For camp everyone was a drop off and it started at age 2 as long as they were potty trained.
I know some places don't really like parents on the floor once the kids are a certain age, it can make it harder for the coach, but if he just wants to be with you maybe they will let you go out there with him for a class or two. I know and understand why he can't play on something else - liability, insurance, not always safe especially if there is anything else going on in the gym at the same time. Having been on both sides coaching you worry when they want to go off since you are trying to keep everyone safe, while having fun and practicing you worry that you are going to accidentally hit or land on a little one, and yes I have seen that happen and the little one was okay, but the older girl ended up hurting herself.
Another option is see if you can maybe just go outside the building or the area where he can see you, since then he may want to participate more. You can always come right back after about 5 minutes or less and take a quick peak and if he is participating great and if not he can come and hang out with you. I've seen a lot of kids do better when they can't see Mom or Dad. The same goes for in the gym when they fall the mat they land on is usually very soft and some parents make a big deal out of it and they end up crying versus letting them know what a great crash they just had and they think it is funny and you look over and three more kids are crashing on purpose.
If he really doesn't like and it isn't happy and you have talked to the coaches, maybe it is time for a break. You could always take a week or two off the class and see if he mentions it or wants to go if you bring it up after a week of not going. If he is joining in more with each class I would keep going, but if he really doesn't enjoy it maybe revisit it again later. It might also help if he knows one or two other kids in the class before it starts or can get together with them between weeks so he has a friend in class.
Good luck to you both!