The expression “in a pretty pickle” means: behind the 8-ball; the devil to pay and no pitch hot; in trouble; in a sorry plight.
The Dutch, from whom we borrowed “pickle” and also the original phrase some four or five hundred years ago, said in de pekel zitten, literally to sit in the salt liquor used for preserving vegetables and meats.
Such a bath, one can well imagine, would not long be comfortable.
From time to time through the years our forebears have intensified the expression in such manners as “ill pickle,” “sad pickle,” “sweet pickle,” and nowadays, “pretty pickle.”