Born in Bogotá, Colombia, Barrera moved to the United States at the age of eight, growing up in Thousand Oaks, California. He trained with Sheffield United F.C. as a teen. He developed his game in the United States both with the US Soccer residency program and at the high school level with Westlake High School, where he skipped his senior year of high school. He was named as a Parade magazine All-American and regarded as one of the top recruits coming out of high school. RiseMag.com listed Barrera as the #1 recruit in his class.
He attended the University of California, Santa Barbara where he was a student-athlete and played college soccer with the UC Santa Barbara Gauchos men's soccer team from 2008 to 2010. He would appear for the team in 66 games, scoring 10 goals and adding 22 assists. He left UCSB after his junior year to pursue a professional career.
While still attending college, Barrera played with the newly formed PDL team Ventura County Fusion in the summers, alongside his brother Diego Barrera. For the 2009 PDL season, Barrera and Ventura County Fusion beat Chicago Fire Premier for the league championship. Over 4 seasons, he appeared in 39 games for Ventura County, scoring 13 goals and 15 assists.
After being named to the 2011 PDL season All-League Team, Barrera signed with Serbian SuperLiga side FK Spartak Zlatibor Voda in August 2011 after a successful trial. He made his debut for Spartak against FK Borac Čačak on December 10, 2011.
Barrera returned to the United States in 2012 and re-joined Ventura County Fusion and appeared in 6 games, but played for Cal FC in their historic 2012 Lamar Hunt U.S. Open Cup run coached by Eric Wynalda. In July, Barrera signed with Atlanta Silverbacks. He was the first signing of new Silverbacks head coach Eric Wynalda, who had just been appointed some days earlier. Wynalda, who coached Barrera at Cal FC, had previously stated that he's wanted Barrera playing for his team since 2010 when he first saw Barrera playing in Santa Barbara. In August 2012, Barrera joined English Football League Championship side Derby County F.C. on trial, where he featured in preseason friendlies against Belper Town F.C., Chesterfield F.C., and Matlock Town F.C.. He would return to Atlanta after the trial proved unsuccessful.
Barrera joined San Antonio Scorpions ahead of the 2014 North American Soccer League season. He was traded later that season to Carolina RailHawks for César Elizondo. At the conclusion of the season, Barrera re-joined Cal FC for their 2015 Lamar Hunt U.S. Open Cup run.
Barrera joined Sacramento Republic FC in June 2015. He was re-signed by Sacramento for the 2016 USL season. Head coach Paul Buckle moved Barrera to a more central position in the midfield and made him the team's captain.
When he was 17 he was a member of the USA team at the 2007 Pan-American Games being the youngest player of the roster. He also represented United States at U17 and U18 levels.
IndividualUSL All-League Team: 2016
Danny's older brother, Diego Barrera, is also a professional soccer player. Barrera enjoys being able to experience other cultures through his soccer experiences and plans to be a coach after he retires.