This happened to me a few months back. Until I had time to deal with it I uninstalled the printer driver then followed the directions to connect it directly to my PC with USB.

Later I had time to try again and found my router had a firmware update which you would have thought it would have never worked given the story. But again I uninstalled the printer driver after the router update and checked all my router settings then ran the whole printer setup again. It's back and working.