Hi,
Does it behave normally if you watch videos or play games with the charger connected and powered on?
If so, turn off the tablet and leave the charger connected and ON to fully charge the battery.
Once the battery is fully charged, disconnect the charger, turn on your tablet and then try playing games (or watching videos) and see how it behaves. If it functions normally your battery was just low and needed to be fully charged. If it still shuts down your battery is failing and needs to be replaced.