A gymnasium, also known as a gym, is a covered location for athletics. The word is derived from the ancient Greek term "gymnasium". They are commonly found in athletic and fitness centres, and as activity and learning spaces in educational institutions.
Any work or act or business which causes or leads or results in sinful act is not permissible. Making both genders mix with out proper Hijab is not allowed in Islam. Usually gyms in western countries don't care for proper Hijab, that it why Muslim should not indulge himself in such business which can lead to sinful acts, otherwise he will be responsible and his income from such sinful business will not be lawful.
There are many shar'i concerns regarding a mixed gym, for both males and females.
The dressing of men and women are not within the shar'i boundaries, and any male or female will without choice see someone of the opposite gender with bare minimum clothing, or in provocative positions that for us could be considered immodest in public. This could lead to lustful gaze, and other things that entail haram.
If you are able to avoid all of this, and avoid doing things that would be against a Muslim woman's public modesty, then you can go. This means you would need to go at a time where there are no men at all.
Alternatively, you can go to a women only gym, or purchase gym equipment and use at your own discretion at home.
And Allah knows best.