“Take a powder” is a tough way of telling someone to get lost or get out of here and began as a rude dismissal of women.
The expression was popularized in the gangster movies of the 1930s.
When a tough guy was having a private conversation that he didn’t want a woman to overhear, he would use the phrase that the girls used when they excused themselves to use the washroom or refresh their makeup.
They’d say they were “taking a powder.”