I got my MacBook Pro in March, and in the last month it has not been working properly. It started when it completely ran out of power while I wasn't home, and when I tried plugging it in it wouldn't work, nor would my computer turn on. When I plug it in, nothing happens, no green light, no indication of any power going into my computer. I took it into Best Buy (there are no apple stores near me) and it worked fine there, so they couldn't do anything. I brought it home, and it charged fine for a couple of weeks, at my house, on vacation, in a hotel and vacation rental home. While it was connected to the charger, it quit working again at one hotel. I brought it back into Best Buy, and again it worked fine, and continued working for two days after I brought it home. Last night I plugged it in and it charged for about ten minutes before it stopped working, AGAIN! Does anybody have any clue what is going on?
If you contact Apple, the first thing they'll tell you to do is an SMC reset. It's easy, just turn off the machine. Then hold in the power button until you hear this horrible long beep sound, then let go of the power button. Should have to hold that button in for about 15 seconds. Now, that may help you, but for the various times I've been told to try that, I've never actually noticed doing that help me. But, Apple will tell you to do that, so you may as well try it now.
Power Management Firmware
Another thing is there have been various firmware updates around power management for my MacBook, which is far older than yours. You should be certain no such updates exist. You'll have to boot in to OSX and use the Software Update utility to check.
I won't be too surprised if you message back saying you've got this far without a change. I've had the kind of behavior you've had before, actually a couple times. One time, it was my power adapter. I've used my (many years old now) MacBook a TON and I managed to wear out my power brick/adapter. You can easily enough test that, by taking your MacBook in to an Apple store (or some place that has them on display). Just plug in their power to your machine and see if that seems to cut it. Of course that's not a totally certain test, but if it's looking good, then you should ask Apple for a replacement power brick. Be mindful about the power capacity of the brick you try too. For example a MacBook Air brick isn't meant to source enough power for a 17" MacBook Pro.
I think it's unlikely to be your battery itself, but it could be. If you've been using that thing profound amounts, your battery may be pretty battered already (heh, almost a pun). Go in to the System Info app (linked to from About This Mac under the menu bar at the top). Click on your battery and check the charge cycle count. If it's getting near 300, then your battery is at its end of life and you should ask Apple for a replacement.
Failing that stuff, I'd really suspect your motherboard to be the issue. This is where you arrange to go to an authorized Apple Service center (or the Apple Store nearest you). They'll fix it up, given the age of that machine, you should have minimal hassle.
Like I said, I've dealt with this kind of stuff a few times with my MacBook. I've been a little annoyed about having power problems (or any for that matter) with my machine, but I've found Apple to be extremely good at service. The worst Apple service I had was through a 3rd party servicer. I've also had some good 3rd party ones too.
Hope that helps ya.