This strange word was introduced into English in the early part of the seventeenth century, as an adjective that pertains to alms or almsgiving or charitable actions.
It derives from medieval Latin eleemosynarius, “compassion, mercy”, which can be traced back to the Greek eleos, “pity”. The 1911 edition of the Encyclopedia Britannica used it to describe the medieval Canterbury Cathedral:
At the greatest possible distance from the church, beyond the precinct of the convent, is the eleemosynary department. The almonry for the relief of the poor, with a great hall annexed, forms the paupers’ hospitium.
Though they don’t look it, eleemosynary and alms are connected. The second is the older, which arrived in Old English in a very distorted form via Old High German from a relative of the Latin original. At first it was spelt almes, but had been shortened to its modern form by the seventeenth century. By another route, this time through French, the Latin word turned up as aumonry, “a place where alms were given”, an office in a religious house or household of a prince or bishop; the person in charge was called the aumoner.
By the seventeenth century these had come to be spelt in the modern way as almonry and almoner, but it was only at the very end of the nineteenth century that the latter was applied to an officer in a hospital who looks after patients’ welfare, a post now more commonly called a medical social worker.