You need an adapter to plug your GameCube controller into your Wii U. Now, there are a few different adapters out there each with their own advantages and disadvantages.
There's one that plugs into your Wiimote and allows the GameCube controller to be used as a Classic Controller, so it has great compatibility with games, but you won't have analog input for L/R and you'll be missing the left bumper that some games use from the Classic Controller.
There's the official adapter which the GameCube controller works perfectly with, but the only official title that supports it is SSB4. There's a library for it for homebrew, but the homebrew has to be compiled with it.
There's a few others out there, just Google around and buy the one you like.