Musculoskeletal chest pain starts from the muscles, bones, joints and connective tissues of the outer chest wall. This kind of pain most often results from chest trauma, like a car accident or fall. Chest muscle strain resulting from overuse also causes chest pain. It can happen if an inactive person is doing a vigorous activity. Give it 2-3 days of rest and take Tylenol
Do not exercise for the 2-3 days. If it's not better then I suggest seeing your doctor.
Don't stop going to the gym. Just change up your routine for a while. Try working on legs, or cardio for awhile. The injury just may heal itself in a couple weeks.