Lucky for you your ex-wife is not the vindictive type. In order for you to get arrested for "harassment" she must have a restraining order against you saying you can't bother her, or usually it says stay away from her at her place of employment when she is working. But it is not easy to get such an order. She would have to go to court and obtain a temporary restraining order (TRO) based on a declaration signed by her under penalty of perjury. Then you have to be personally served with the court order. But that order can be contested by your when the court sets a date for the permanent order. You have various rights to tell your version of the events and you will be asked to file a "response" when the order is personally served on you by an uninterested party. IN other words, if she serves you, the service is invalid and could void any court orders. Service by mail is not enough for the court to have jurisdiction over you unless you voluntarily make an "appearance" by filing a response to the false charges against you.
In sum, unless you are ordered by the court, in your divorce conditions or later by a restraining she cannot do anything to you or have you "escorted off the premises." But the gym does not have to let you join for reasons other than race, creed, etc.