Quick Introduction – iPhone not charging after the battery drained completely
I would suggest first to try another charger! Than by what you say, “It had been taking a really long time to charge lately, but once it’s charged, the battery seems to hold it just fine.”, the battery seems not to be responsible for this situation! I would suggest to take it at a service point since it is out of warranty. If it really has problems with charging circuits (which are docked to the board) you can’t do much on your own.
Will not turn on, will not turn on unless connected to power, or unexpected power off
Reasons or methods to detect why iPhone not charging after the battery drained completely
1.Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
2.Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIs and corrosion.
3.Connect the iPhone to the iPhone’s USB power adapter and let it charge for at least ten minutes.
4.After at least 15 minutes, if:
a).The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen User uploaded file. Then unplug the phone from power. If it immediately turns off, seek service.
b).The low-battery image appears, even after the phone has charged for at least 20 minutes: See “iPhone displays the low-battery image and is unresponsive” symptom in this article.
c).Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
5.If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
a).If the display turns on, go to step 4.
b).If the display remains black, go to next step.
6.Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn’t appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
Check Apple community what says about this issue :- https://discussions.apple.com/thread/5130667