"
This usually means that your battery gauge needs to be calibrated. Apple actually recommends doing this on a monthly basis, but the advice is buried in the battery info tiphttp://www.apple.com/batteries/iphone.html.
What you need to do given your current problem: When the phone shuts off and it isn't down around 1%, connect to a charger for just a minute or 2, or wait 15 minutes, then reboot the phone (hold HOME and SLEEP until an Apple logo appears). Continue running the battery down until it shuts off around 1%. If it goes off above that value repeat the above process until you really do get to 1% (this will rarely take more than 2 tries).
Once it has turned off and won't restart or reboot charge it with the wall charger for 4 hours without using the phone. This should fix the problem for the moment. Going forward, about once a month run the battery all the way down and charge for 4 hours. This should prevent the problem from recurring.
If this does not work your battery may be failing. As it's still in warrantly take it to an Apple store for repair."
I am having the same problems with my phone and found this discussion last night and tried to follow this procedure but I could not get my phone to turn on and run down to 1%. It shut itself off from 15%-7% almost instantly. I rebooted it as recommended by others and turned it on and let it shut off until it got down to 7% then it would no longer turn on. even after sitting for a little while. I have charged my phone to full overnight with the charger that it came with and will wait to see if the problem persists. I am very frustrated with this and found out that my phone is a few days outside the 1 year warranty. If anyone has had this situation and found a fix without getting a new phone, please let me know.