Born in Sweden, Gustafsson spent parts of his childhood in Feldkirch, Austria, and Langnau, Switzerland, where his father was playing and then coaching. He then moved back to Sweden where he developed into a top prospect, making his debut in the country's top-flight SHL with Frölunda HC during the 2007-08 season. Gustafsson was selected in the 1st round, 21st overall, by the Washington Capitals in the 2008 NHL Entry Draft. Gustafsson was ranked fifth among European skaters by the NHL's Central Scouting Service. After being drafted by the Capitals in 2008, Gustafsson played the 2008–09 season with Bofors IK of the HockeyAllsvenskan. He then signed a three-year entry-level contract with the Capitals on May 15, 2009. The Capitals assigned him to their American Hockey League affiliate, the Hershey Bears, during the 2009–10 preseason, and on October 15, 2009, they loaned him to Borås HC for the remainder of the season in order to get him more playing time than was feasible in Hershey. Gustafsson returned to North America for the 2010 season, but did not make the Capitals team or the Bears team. After spending training camp in Washington and Hershey, he was assigned to the South Carolina Stingrays, the ECHL affiliate of the Washington Capitals on October 9, 2010. On October 18, 2010, after playing one game with the Stingrays, Gustafsson informed the Capitals that he no longer wished to continue his career in North America and returned to Europe. The Capitals immediately suspended his contract. He played for Swiss NLA outfit SCL Tigers in the 2010–11 and 2011-12 season, followed by one year at Asplöven HC in his native Sweden. Gustafsson then returned to the SCL Tigers for a second stint, playing under his father and helping the club win the 2015 NLB championship and move back to the NLA. Midway through the 2015-16 campaign, which he again spent with the SCL Tigers, Gustafsson inked a two-year deal with fellow NLA side HC Fribourg-Gottéron, starting with the 2016-17 season. He parted company with Fribourg-Gottéron in December 2016 due to personal reasons and signed with Färjestad BK of the Swedish Hockey League shortly after leaving Switzerland. At the conclusion of the 2016–17 season, Gustafsson moved back to Switzerland for a second stint with NLA side SCL Tigers, signing a two-year deal in April 2017.