I have read a lot of material by and about Johnson and I don't recall this story or anything about his lack of bathing, although he was sometimes known to be careless in his attire.
When I searched for the quote online, lots of people attribute it to Johnson, but no one seems to provide an original source. I did see it mentioned on one page devoted to questionable quotes.
Gee, thanks for being such a stinker!
"Samuel Johnson paused to rest on a London park bench one hot summer's day, his profusely sweating bulk caused a young woman sitting next to him to accuse him of smelling. ''No, Madam,'' he replied. ''You smell, I stink.'' Dr. Johnson was taking delight at pointing out the grammatical ambiguity of a verb both transitive and intransitive, but his observation is underpinned by our curious relationship with our sense of smell. When we want to indicate understanding, or clarity of mind, we invoke the visual sense: ''I see.'' ''That is quite clear.'' Suspicion and intrigue, however, lead us to olfactory imagery. If something is not quite right we exclaim, ''I smell a rat.'' ''This whole rotten business smells.'' ''The perpetrator is a stinker!'' What does this tell us about the sense that never rests as long as we breathe?"