This idea is based on the desire of early-modern Europeans to emphasize the backwardness of their medieval ancestors when compared both to themselves and to the Roman civilization which preceded the "dark ages".
After the collapse of the Western Roman Empire, most of the heated baths which were widespread in Roman cities and villas fell into disrepair. Obviously the lack of sophisticated public baths doesn't mean people actually stopped bathing, it just means they were less comfortable when they bathed. Also, even at the height of Roman power it was only a small minority of people who would've has access to those baths.
I believe there are also a few references in medieval texts to overly frequent bathing being a sign of decadence or something like that.
These days I see the idea of Europeans not bathing being promoted most frequently by Hoteps or pro-Native American activists who will occasionally claim that Europeans didn't bath until they were taught to do so by Africans or Native Americans respectively.