In February 2002, Gallardo resigned from Maricopa County Election Department and announced his candidacy for the Arizona House of Representatives. He was elected in November 2002 to represent Legislative District 13 covering areas of Maryvale, Glendale, Tolleson, Cashion, and Avondale. Gallardo was elected to the Arizona House of Representatives in 2002, 2004, 2006 and 2008. In January 2009, Gallardo stepped down from the Arizona House of Representatives to work for a consulting firm. Shortly after the enactment of
Arizona SB 1070, the broadest and strictest anti-illegal immigration measure in the U.S., he announced his candidacy for Arizona State Senate for Legislative District 13. He was elected in November 2010 and reelected in 2012. In 2011, Gallardo was one of more than two dozen Arizona politicians who accepted free tickets to attend
college football games, known locally as the
Fiesta Bowl. He also accepted free tickets to
NASCAR's
Phoenix International Raceway Subway 500. He then became a crusader to ban legislators from accepting such gifts from lobbyists, though defended the practice in the absence of the law's enactment. In January 2013, Gallardo introduced a series of bills to enhance the rights of LGBT persons by ending the state's ban on same-sex marriage, prohibiting discrimination on the basis of sexual orientation or gender identity in employment, and ending the state's preference for married persons over single persons in adoption. In October 2013, Gallardo was elected Minority Whip of the Arizona Senate by his Democratic colleagues. In December 2013, Gallardo became one of the plaintiffs in
Gallardo v. Arizona, a lawsuit that challenges the addition of two at-large seats to the Maricopa Community College District as a violation of the state constitution. In 2014, Gallardo again introduced legislation to repeal Arizona's anti-immigration law. He noted that the legislation he wanted to repeal took four years to pass and "It may take us longer to get it repealed. But we are not going to stop until we get it repealed." Following the passage of
Arizona SB 1062 in February 2014, which sought to allow businesses to deny services to
LGBT people, especially
same-sex couples, based on religious beliefs, and its veto by Governor
Jan Brewer, Gallardo
came out as gay. He referred to the bill as a "game changer," and noted the national controversy surrounding its passage, as prompted his decision to come out. ==2014 congressional candidacy==