Mine do that from time to time. The acid test is to check the icon in the menu bar. If it says you are charging or the percentage is 95% or greater and you see a electrical plug icon, you are ok. If you see a black battery icon, then the charger is not working. Wiggle the connector and see if it will start functioning again. If not, you may need a new one. If available, try a different one to see if the problem is the power adapter or the MBP.
You may also look at this Apple support article for additional information.