When the York Poor Law Union was formed in 1837 it initially took over the old Workhouse in Marygate (now the Post Office Social Union), which had been established by a number of the city parishes. However, the Poor Law Commissioners in London considered the Marygate Workhouse unfit for purpose, as it was overcrowded, unsanitary, and the building did not allow for the segregation of inmates.
A new workhouse, located on Huntingdon Rd, was completed in 1848. The building, designed by local architects JB and W Atkinson, could accommodate approximately 350 inmates and included separate wards for women, men, children, 'idiots', the sick, and the aged. Over the course of the nineteenth century the workhouse evolved into a home for the infirm, including sick wards and trained medical staff. During the 1920s, in an effort to reduce the stigma surrounding the word 'workhouse', it became known as the City Institution (or simply The Institution). In 1930, when the Poor Law Union ceased to exist, it became a Public Assistance Institution (but was still known as the City Institution, or the Institution and Infirmary).
Between 1939 and 1941 some of the infirmary wards of the Institution acted as an Emergency Medical Services Hospital to accommodate the wounded military.
In 1947 the workhouse buildings were renamed again as The Grange, and what had previously been known as the Infirmary was called the Grange Hospital. In 1955 The Grange Hospital became St Mary's Hospital, while the buildings known as The Grange continued to offer welfare accommodation. By the 1970s both The Grange and St Mary's had closed, and in the 1990s the former workhouse buildings were converted into student accommodation for St John's University.