The World Wide Words entry is a bit dated. The origin is known with a fair degree of confidence. The phrase is a clipping of take a run-out powder. That form dates to at least 1909, and the shorter take a powder is from at least 1911.
At question is exactly what a run-out powder is. It’s definitely some kind of substance that would make or enable you to leave quickly. Most likely it’s a reference to a laxative, forcing a quick departure for the facilities, but it could be some form of Mickey Finn that makes one woozy want to leave.