Gustafsson was named head coach of the Swedish national team in 2005. Under his guidance, Tre Kronor captured gold at the 2006 Olympic Games and the 2006 World Championships, becoming the first coach to achieve this "double". He earned Swedish Coach of the Year honors that year. Gustafsson also led Team Sweden to a bronze medal at the 2009 World Championships. He stepped down from his position in 2010.