Dry the paint completely using a towel, or allow it to air dry fully before continuing. Scrape away any loose paint using a putty knife blade, including any paint bordering the paint that is peeling.
Apply spackling to the area of the wall or ceiling where the paint peeled until the affected area is level with the surrounding wall surface. Depending on the depth of the damage on the wall or ceiling, you may need to apply multiple layers of spackling until the wall or ceiling surface is level again.
Sand the dried spackling with fine-grit sandpaper, removing any rough patches in the spackling as well as blending the spackling's edges with the rest of the wall. Hold a running shop vacuum hose next to the surface you are sanding to help capture the dust.
Apply primer to the patch in the wall or ceiling using a paintbrush. Once the primer has dried, apply a coat of paint to match the rest of the wall or ceiling.
Prevent future moisture problems in the bathroom by opening the window, running the fan and leaving the shower curtain or door open after anyone showers or takes a bath.