I think you need to read some stuff by Eric Cressey. he is incredibly knowledgeable when it comes to the shoulder.
The pain maybe be traced back to grabbing the bar during squats but I would bet that the lack of ROM is due to the pressing and the actual pain may be a shoulder impingement which sucks but good news is that you can do a ton of stuff to help yourself out.
Make sure you are keeping your push-pull ratio at least 1-1 if not make sure you are pulling more than pushing. Especially horizontal pulling.
Check yourself for internal rotation of the shoulders. Get on a foam roller to the pec muscles and get some external rotation work in. This is a general and over simplified answer but there’s not a ton of info to go on.
You might also find success using a safety bar where the handles come in front so you grab them with a neutral grip in front of your chest.
Go to Youtube and search dave tate he usually seems to workout with a safety bar, probably cause he is a powerlifter and powerlifters have common shoulder problems frequently.
Get on foam roller and get yourself loosened up. Then work on your scapular positioning. If you cannot depress your scapula on your own you need some work.
Traction is another excellent method. Especially for the shoulder. I have a shoulder impingement and I do traction about half the time I stretch after a workout.
One of the westside guys wrote a good artcile on traction using bands, which is the method Ive had the most success with. Sorry I dont know who it was by but it was about 3 years ago.
Also I dont know what your nutrition is like but getting on a high quality, good fat supplement, like fish oil, is a must. This can help with healing the tissues and will improve your body’s efficiency.
Hope that helps.
Remember that this is just a suggestion. I may be completely off. The words “It depends” come up a lot when talking about the shoulder. Im only going off what I see most often, and really it just depends.
If anyone else has anything to say about what I wrote please do, even if you disagree. Thanks