Soldado had put Los Che ahead in the first minute, but he put through his own net to level things up six minutes later and Lautaro Acosta added a second goal for Racing in the 14th minute.
Adrian Gonzalez made it 3-1 to the visitors 10 minutes after the break, but Adil Rami reduced the deficit almost immediately and then Soldado’s late brace settled the topsy-turvy encounter in the hosts’ favour.
Imanol Agirretxe scored with neat headed finishes either side of the break to give the Basque side a 2-0 lead, but Sporting replied almost immediately through Miguel De Las Cuevas’ penalty.
Sociedad also had Carlos Martinez sent off in conceding the spot-kick and came under severe pressure in the last quarter, but held out for the three points.
In the late kick-off, an 88th-minute header from Ruben Castro earned promoted Real Betis a 1-0 win at fellow top-flight new boys Granada after substitute Jonathan Pereira had capitalised on a mistake by defender Manuel Lucena.