It was painted early in the year. Now large parts of it are peeling into large slices of paint, like an orange. It's still attached, just being peeled away and hanging from the ceiling. Under the white paint or above it, a grey ceiling unaffected.
In all likelihood, you put a modern water based paint over an older oil based paint.
Peel off the paint, Put on a mask and go over the old paint with a random orbit sander just to rough it up a bit. Wipe off the dust with a damp rag, and let it dry. This would be a good time to go to your favourite orange or blue store to get some primer. I happen to like Kilz, particularly for bathrooms. Prime the ceiling, and let it dry thoroughly.
Now paint, letting it dry completely between coats, and avoid using the shower for a couple of days.
It's because you painted over a glossy surface. The entire purpose of gloss in paint is to provide a surface that lends itself to easy cleaning and resists contamination by dirt, water, oils or ... Paint.
The right way to paint a glossy surface is to
If you're changing paint types, wait until the paint is old enough that it's no longer chemically active.
clean it... Because dirt and oils will contaminate the new paint, and best to do it while it's still glossy.
knock the gloss off any practical way. You're done when it's not very glossy anymore. I'm a big fan of green scotchbrite pads, they are readily available, make a minimal cut, and are easy to work wet if you're worried about dust. Not as big a fan of sanding since that will blow out high spots, re-contour the surface and miss low spots. If the sander punches through to the substrate, now you have to prime, or the substrate will show through.
a last cleaning to remove sanded material.
If the old paint is uniform and in good condition, I would consider skipping primer unless the topcoat requires a special primer.
Topcoat should stick fine at this point. It will be molding into, and mechanically engaging, the microscopic "tooth" of roughness in the old paint. So the type of old paint shouldn't matter too much.