I've had the iPhone 5 for almost a year now and I HAD the same problem.
This fixed it for me:
Before I had iPhone 5 I had iPhone 3GS. When I got the new phone I backed up everything from 3GS and set up the new phone from that backup, all contacts, messages and that. I got the problem from the start; low volume from the headphone socket. The speaker volume was not affected. I read it somewhere that when you "restore from backup" from 3GS (might happen on other types, don't know) the iPhone 5 got a problem with the volume.
So the fix was to set the phone up "AS A NEW PHONE". I backed up the contacts on 3GS to iCloud and imported photos etc. to my macbook so I wouldn't lose them. Restored everything with no problem to the new phone. There was a DRASTIC difference in the headphone socket volume. Haven't had the problem since.
-b
UPDATE: Sorry, I must have misunderstood the problem. My problem was vice versa to yours. Anyway... If people have problem with the headphone socket volume, this might help...
Message was edited by: BinniB