Simple: they used wine, as they always had. The Eighteenth Amendment ratified in 1919 is the law most think of regarding Prohibition, but it provided little detail; Congress passed the corresponding National Prohibition (or Volstead) Act to fill out the details of how it would be applied. That act explicitly exempted wine used for religious purposes, not only by Catholics but also the other denominations (Orthodox, Lutheran, Episcopalian, and others) who use wine in Communion, as well as Jewish uses. Recognized clergy were given license to buy, possess, and even make wine for their religious purposes. Several wineries survived Prohibition at least in part because of the sacramental wine market. It was also not a coincidence that the amount of wine sold for purportedly sacramental purposes rose dramatically during Prohibition, as Americans love a good legal loophole; there's a similar story with "medicinal whiskey" as the Volstead Act also recognized and allowed certain alcohols for medical purposes with a doctor's prescription.
Edit: Here's the relevant text of the Volstead Act:
Nothing in this title shall be held to apply to the manufacture, sale, transportation, importation, possession, or distribution of wine for sacramental purposes, or like religious rites, except section 6 (save as the same requires a permit to purchase) and section 10 hereof, and the provisions of this Act prescribing penalties for the violation of either of said sections. No person to whom a permit may be issued to manufacture, transport, import, or sell wines for sacramental purposes or like religious rites shall sell, barter, exchange, or furnish any such to any person not a rabbi, minister of the gospel, priest, or an officer duly authorized for the purpose by any church or congregation, nor to any such except upon an application duly subscribed by him, which application, authenticated as regulations may prescribe, shall be filed and preserved by the seller. The head of any conference or diocese or other ecclesiastical jurisdiction may designate any rabbi, minister, or priest to supervise the manufacture of wine to be used for the purposes and rites in this section mentioned, and the person so designated may, in the discretion of the commissioner, be granted a permit to supervise such manufacture.