If dev-lang/php build with 'gd-external' flag then 'USE=gd emerge gallery' shows error msg.
Don't you mean 2.1.1a?
fixed