When I was younger I used to do alot of heavy weight training. I had a pain like you describe once and thought I was having a heart attack. It turned out just to be a pulled muscle in my chest. I was 19 or 20 when this happen. Gas pain can also feel like this, along with more serious issues. Good luck.
Hello!
It can be a chest muscle sprain.
Take NSAIDs, use ice packs and rest for couple of days for the pain to subside.
If pain continues then you would need a chest X-ray and also a need to follow up with an orthopedician.
Take care!