On the main Nintendo help page, it suggests restarting the router or modem. I live in a dorm, thus there really isn't anything I can do about this error. Online works for everything else (PS3, PC, etc.), but for some reason the Wii U is being extremely stubborn and won't connect. I'm using the Wii LAN Adaptor, and I know that it isn't faulty since my Wii can connect online.
Furthermore, it will sometimes say the Connection Test succeeded, then after looking for an update, it backtracks saying that it can't connect. It's just getting really frustrating, and would like any help. If you need more information, please ask, as I'm not sure what all would be useful information.