Unfortunately Apple's error codes are very much a mystery (at least to me), try restarting the Apple TV, iPad and router. If that doesn't help look into whether you might be encountering interference on your network.
Intermittent problems are often a result of interference. Interference can be caused by other networks in the neighbourhood or from household electrical items.
You can download and install iStumbler (NetStumbler for windows users) to help you see which channels are used by neighbouring networks so that you can avoid them, but iStumbler will not see household items.
Refer to your router manual for instructions on changing your wifi channel.