I imagine that gills would behave like a nose. You can train your nose to close and not take in water.
Gills are a passive surface of exchange between the blood stream and the outside, you can’t do anything about it. To “breath” fishes get water in their mouth and then push it out of their [missing english word] … cheek(?) the water pass in between the gills and passive exchange happens. As long as they are exposed to the outside exchange can happen, if they’re exposed to air they dry. Having gills on a human could be a major source of dehydration.
I guess we can imagine that there’s some flap over the gills that keep them safe from the air though, mutations in cdda are not classic biology ^^" .