"When the photographer was getting everybody set up and having people say 'cheese,' the protesters yelled: 'say torture, instead,' 'resign' and 'I don't recall,"' said Nate Ela, a protester and third-year student.
Law school spokesman Mike Armini said the impromptu protest Saturday was so small that some of those attending the photo shoot did not notice it.
Ela said the protesters followed Gonzales into the law school's library, chanting "shame" and "resign," before the attorney general's security detail took him to his motorcade.
Gonzales was at the university to deliver a lunchtime speech, a visit that was unannounced to students. But word spread quickly after his motorcade and security detail were spotted.
"The departure was clearly undignified," said Thomas Becker, a second-year law student who wore the black hood and orange jumpsuit during the protest. "He looked really annoyed."
A Department of Justice spokesman did not immediately return a call seeking comment.
Gonzales is resisting pressure to resign as lawmakers question whether he could effectively run the Justice Department amid the controversy over the firings of eight prosecutors.