Dotted fabric itself is older, but the name "polka dot" locked in during the 1880s, when a polka dance craze that had swept Europe since the 1840s got slapped onto every product imaginable. Printing or weaving evenly spaced, evenly sized dots required precise machinery, so it only became a common, affordable pattern once mass production caught up.
The key structural fact is that the repeat unit isn't a plain square grid — it's rows staggered by half a step. That offset is what makes the spacing feel even in every direction and reads as a proper polka dot; a straight square grid of dots draws the eye to the grid before the dots.
It's easy to confuse with the effects-category dot-pattern, but the use case differs. That one is a small, uniform grid faded out at the edges with a mask, built for UI backgrounds. Polka dot is the larger, higher-contrast, edge-to-edge repeat used in fabric and fashion.
When to use
Use for dress or packaging texture and a retro/kitsch mood. For a UI background, dot-pattern's edge-masked version is the better fit.