It seems muscle sprain due to which you feel pain when you exert.. and when you stop gym, pain reappears due slow supply of blood in sprained area..
Next Steps
Take muscle relaxant with Homeopathy medicine.
Health Tips
Try to do light exercises in gym..