Prior to the creation of the National Health Service in 1947, people mostly had to pay for medical treatment. There were exceptions and one was the Workhouse hospital. Most workhouses had an infirmary attached. Probably originally that was intended only for workhouse inmates but as time progressed it is evident that people presented themselves at the workhouse for medical treatment rather than because they were destitute.
If you look at the Belfast workhouse admission records (which are in PRONI), you can usually tell whether someone was already in the workhouse when they went into the hospital. If they originally sought accommodation they are recorded as being admitted to the workhouse. If needing medical treatment on arrival, it usually says “to the infirmary.”
When the workhouse system was closed down in the 1940s, and replaced by the welfare state, most of the infirmaries continued to operate and were admitted to the fledgling NHS system. That happened in Belfast, and as CMcG has explained, it became what is now Belfast City hospital. One or two of the original buildings are still there, though mostly it’s a modern hospital.