Do you mean you physically took it into the shower itself, under the running water? These phones are water resistant, not waterproof or designed to be in a shower. Heck, if you look at the warranty policy, water damage likely isn't covered and that IP rating is nothing more than a marketing gimmick.
If you just had it in the bathroom, but outside the actual shower, it's possible steam worked its way into it. Moisture on the screen can also cause erratic touch response and ghost touches. Try a hair drier to the port. If that doesn't work, try putting it in rice.
This may be a long shot, but I've seen reports of Samsung showing this message when they haven't been exposed to moisture at all. When it happened to my wife's S7, what fixed it was finding the USB settings (or something similar to that, related to USB) in the app manager, deleting the app data, then rebooting the phone. You may want to see if that's possible on your phone too.