House authorities said the powder was "benign" — colored corn starch — and lawmakers resumed their session shortly afterward.
Blair was not injured but the incident was a major security breach in Parliament, which recently put up a bulletproof screen to protect members from possible attacks from the public gallery.
London's Metropolitan Police said two men were arrested but were not immediately charged. Fathers 4 Justice, a group which campaigns on child custody issues, claimed responsibility.
A man in a suit stood up in the public gallery and was heard to shout "do you realize" and "five years." Blair visibly flinched as he was hit by the powder.
Speaker Michael Martin immediately suspended the weekly session of prime minister's questions. A purplish haze was seen in the chamber as members evacuated.
Blair's office said the prime minister was fine.
"He is OK. He walked out," a spokeswoman said on condition of anonymity.
The suspect and an apparent accomplice were grabbed by security officers, and Martin immediately suspended the session.
The man who threw the power was standing in a part of the gallery reserved for guests of members of the House of Lords and the House of Commons. The ordinary public is behind a security screen to prevent such disruptions.
The second man was seen holding up a sheet of letter size paper, but it was unclear what message was on it.
Fathers 4 Justice campaigns on behalf of fathers denied access to their children and has drawn attention to the issue with a series of high-profile stunts.
One member, David Chick, dressed as Spiderman and climbed atop a crane beside London's Tower Bridge in November, forcing police to close the busy traffic route and leading to huge traffic jams.
Four members of the group — dressed as Spiderman, Superman, Batman and Robin — also climbed Bristol's Clifton Suspension Bridge in February, leading to its closure.
There has been a public focus on security at the Houses of Parliament since two anti-Iraq war protesters scaled the tower housing the Big Ben bell, part of the legislative complex, in March.
Peter Hain, the leader of the House of Commons, said last month that British intelligence had clear information about a danger to Parliament. He warned lawmakers that terrorists could attack the chamber with germs or deadly gas.