How to shut down an iPad stuck on the Apple logo?
Disconnect the iPad from the power supply if it's charging. Hold the power button and the home button at the same time until the screen gets black (takes about 3-5 seconds). Then release immediately. iPad should be turned off. If it's turning is back on again then either you were too slow releasing the buttons or something else is causing iPad to reboot.

In this case, the easiest way is to let it run out of battery. 

Other options:
If you would like to fix the error, then connect iPad to iTunes and hold the power button and the home button until you see the iTunes logo. Then follow the instructions on iTunes.