it's pocket lint! same thing happened to my iphone 5, got worse and worse until i had to torque the charger at such an angle and with such force that it would only charge if i put 3 dictionaries on top of my phone to hold the cable tension.
went into an apple store and they cleaned out pocket lint from the charger jack. charges perfectly now.
they warned me not to try to remove the lint myself - they use a special pick that is gentle on the internal charging components i guess. but this was a super simple fix!! try it out!