As Vasmer shows it, both
платок, and also
платить derive from the word
плат which meant "a piece of textile, cloth" and which is connected with the words in different IE languages that mean "wide", that was perhaps the original meaning of this root. The English
flat also derives from the same root, but with its meaning a bit changed.
плат gave such derivative words:
платок - a diminutive noun, "a small piece of cloth";
платье - a collective noun, "things made of cloth" (cf. the English "clothes",
платье originally meant "clothes in general", not just "a dress", even now this word is sometimes used in its original wider sence, like in the phrase "Магазин готового платья", which sells any kind of clothes, both male and female. So, the modern meaning "a dress" is just narrowing of its original wider meaning "clothes, clothes in general");
платить - a piece of cloth was, probably, used as a means of payment, a currency unit, hence the meaning of these two words.