One of our cats had something similar but not as bad. It turned out to be a food allergy. Most food allergies show up around the head, neck area. We had to change her dry food to a more premium brand and the vet treated with steroids and a little cream on her neck and she healed up quite nicely after about 10 days.
I agree with the earlier posts. The vet will be able to tell what is causing your cat such discomfort.
Good luck and keep us posted!