Governor Jan Brewer vetoed a Republican bill that set off a national debate over gay rights, religion and discrimination and subjected Arizona to blistering criticism from major corporations and political leaders from both parties.