iPhone turning off on low battery
Your battery is failing/has failed.

The symptoms that your iPhone is exhibiting is the same as what discussed in the following posts:


Mid 2012 MBP shuts down claiming no power with charge at 30% or 40% or more 
Why is my MacBook Pro showing the low battery screen while at 100%?
Fully charged MacBook Air turns off when power cord removed


Basically, when you see a percentage of battery remaining, it's a calculation based on what it's measuring (volts, amps, draw, etc.) at that moment in time.  You cannot measure remaining capacity - this  especially noticeable if one of the in-line cells is faulty. 

The only solution to this problem is to replace the battery.