Here is an article that has information and links to the iPhone troubleshooting assistant that I would recommend going through for this article:
The main step I would try is this:
Check USB connections. iOS devices require USB 2.0 to function properly. If you are not sure if your Mac has USB 2.0 ports, refer to the computer's specifications. Disconnect other USB devices, and connect your device directly to a USB port on your Mac.
Yes, my first question would be similar to babowa's: not only which USB port, but what device? Are you connecting the iPhone to a USB port on a notebook, a desktop, a monitor, a keyboard, etc. I suspect this may related to the cause of the problem; as noted above, some devices are not meant to, nor capable of, powering other devices.
I hope you find your solution.