The Wii U requires the console to play, and many games will require a TV.
The console is what actually runs the game. The gamepad has little processing power on its own, and simply communicates with the Wii U wirelessly. The gamepad sends the controls to the console, and the console sends the video output back to the gamepad.
Depending on the game, you can play without a TV. Some games such as Mario Kart 8 or Wind Waker HD allow you to see the same thing on the gamepad as the TV. However many games will use the gamepad exclusively for other stuff. For example, Monster Hunter 3 Ultimate used to be TV-only, but added the ability to play on the gamepad in a later update. Other games have not added such functionality and will require a TV to play.