Atletico Madrid took advantage of Barca's stumble as Antoine Griezmann's winner against his former club two minutes from time earned a hard-fought 2-1 win over Real Sociedad to move to within six points of the leaders.