ari + katashi > arigatashi. The verb ari "is, are" in adverbial form suffixed by katashi "difficult". The initial consonant in katashi becomes voiced (/k/ -> /g/) due to the compounding of the two separate words. The original meaning was "difficult to be".