The term powder room originated around the 18th Century. The powder room was considered a closet-sized room where people applied extra powder to their wigs. The Victorian times kept the term "powder room" to discreetly excuse oneself.
You may be familiar with the euphemism "powdering your nose," — as some women still refer to the half bath as the powder room when they use this phrase.