Hi, Thanks for using HCM.
Since the problem happened during Gym and continued it may be due to musculoskeletal problem or may be due to Cardiovascular. Don't strain much, get done one ECG as early as possible, If any problem then follow your doctor advice
and if it is normal then can take analgesic
with muscle relaxant
with complete rest for 2-4 days. Consult your doctor for further examination and management.
Hope I answered your question. Feel free to ask me if you have any further queries.
Wish you good health. Take care.