Hi there - I'm Dr. Sara. Thanks for sending in your question - I'm sorry that your pup isn't feeling well. I know that it can be frustrating and scary.
When dogs have severe abdominal pain combined with possibly vomiting or unproductive retching (like they're trying to vomit but nothing is coming out), then our biggest concern in for a condition called GDV (gastric dilation volvulus) or "bloat". Bloat is an absolutely life threatening emergency. In the early stages they can have severe pain but no obvious abdominal distention, so even though you're not seeing a big belly, this could still be bloat.
Another thing that I see quite frequently that can be very painful but isn't as life threatening is back pain. Sometimes, for no reason we can pinpoint as owners or vets, dogs can develop severe back pain. (think about the last time you "threw your back out" or woke up feeling sore or painful). When your back is sore, it hurts to do pretty much anything, so in dogs this can manifest as you've described with a reluctance to move or vocalizing when being touched. Dogs tighten their abdominal muscles to help stabilize and protect the painful back, so often their bellies will feel hard or even look distended and they'll react to you touching their belly because they're afraid it'll make their back hurt. In some cases pets with back issues will also show weakness or stumbling in the back legs or all four legs.
A physical exam and an X-ray can usually readily differentiate the two conditions, or potentially uncover something new or different. I would suggest calling your vet ASAP and having him seen so that he can be checked for bloat. Untreated, bloat is fatal. Treatment for bloat usually involves surgery to untwist the stomach and tack it in its original normal place. Treatment for back pain usually consists of pain medications, rest, and anti-inflammatories.
Please keep in mind that I'm giving you my educated guess based on your description - the best way to sort out what is going on is to have him examined in person
Please let me know if you have any other questions for me.