That sounds exactly like a frozen shoulder and it's bloody painful, especially if you over extend past a certain point, it can be so painful it'll almost drop you to your knees in agony.
My doc rammed a nice fat juicy needle a couple of times deep into my shoulder joint....didn't hurt much at all in truth and it did help a little.
There are a few exercises you can try;
One is to use your fingers to walk your hand up the the wall to the point it begins to hurt....
Strange things are frozen shoulders, they are nor 100% sure why they occur but it is basically the sheath or cap around the joint squeezes tight rather than stretches and as a result ends out restricting movement and forcing things unduly, quite apart from causing you intense agony, just excacibates the situation and causes inflammation...erm...or something like that :-/
Plenty of rest for the arm, dose up with anti inflamatories of one kind or another and after several months you will suddenly realise the pain has gone and your shoulder is back to normal....
I tried acupuncture, massage, cortisone injections and screaming like a baby when I would give it an accidental wrench, followed by language so foul that birds fell dead from the sky as a result!
In the end it just slowly faded away.
Ian