"Water-based" is not equivalent to "water soluble after drying". I have no idea what this particular (Pebeo brand) gilding size is made out of, but if it's like most others on the market, it's very similar to latex/acrylic paint (or white glue, or a number of other materials): it's water-based in that it can be thinned with water, and it can be cleaned up with plain soap and water while it's still wet. However, once it dries, it's basically insoluble: the only way to remove it is by physical means, i.e. scraping.
That said, unless a glue/paint explicitly says that it's water-resistant once dry, I wouldn't suggest using it in a wet area. It may not dissolve in water, but it may soften, or otherwise not react well.
Also, a bathroom ceiling is not where I'd personally recommend using imitation gold leaf: nevermind the glue, the leaf itself will tarnish pretty rapidly with that much moisture around. You'd need to use a sealer to prevent that, and I don't know of any that are meant to be used in damp areas on a plaster/drywall base. (Plus, how would you go about sealing the stars without getting sealer on the rest of the ceiling? Do you really want a shiny ceiling?)
If you really want to do this, I'd suggest looking into a gilding size and sealer meant to be used outdoors. That'll get you the water-resistance you need in a bathroom, but you'll hit other issues, like possibly discoloring (or worse) the rest of the ceiling, and having to use a respirator to avoid breathing noxious fumes.
One way to get around all those problems would be to get star-shaped wooden cutouts/plaques, gild those (with an outdoor-rated size and sealer), and glue them to your ceiling.