I think it depends on the actual ownership of the gym. In many cases the gyms are owned by a third party or managed by one. While the staff there might be Marriott associates, they may be employees of the thrid party.
In addition, earning points is normally confned to money spent at a Marriott hotel in conjunction with a Marriott stay (night in the hotel). As Professor Ciara mentioned you can get Marriott Rewards points by using on the Marriott branded credit cards, the Visa card.
Money spent at a Marriott earns as much as 5 points per dollar, and as long as the receipt shows the vendor to be Marriott, those points should be credited to your account.
Good luck and let us know what you find out.
JF1872, thank you for your question. Marriott Rewards members can only earn points if they have a stay at the hotel or by using the Marriott Rewards credit card. Members who have gym memberships but are not staying at the hotel do not earn points on this type of spending, unless they use a MR credit card for the gym fees.