Ciliated epithelia produce fluid flow in many organ systems, ranging from the respiratory tract where it clears mucus to the ventricles of the brain where it transports cerebrospinal fluid. Human diseases that disable ciliary flow, such as primary ciliary dyskinesia, can compromise organ function or the ability to resist pathogens, resulting in recurring respiratory infections, otitis, hydrocephaly and infertility. To create a ciliary flow, the cilia within each cell need to be polarized coordinately along the planar axis of the epithelium, but how polarity is established in any ciliated epithelia is not known. Here we analyse the developmental mechanisms that polarize cilia, using the ciliated cells in the developing Xenopus larval skin as a model system. We show that cilia acquire polarity through a sequence of events, beginning with a polar bias set by tissue patterning, followed by a refinement phase. Our results indicate that during refinement, fluid flow is both necessary and sufficient in determining cilia polarity. These findings reveal a novel mechanism in which tissue patterning coupled with fluid flow act in a positive feedback loop to direct the planar polarity of cilia.