Sansone put the visitors in front in the 33rd minute and doubled their advantage after the interval as Sassuolo won for the second time away from home this season.
The outcome has lifted Sassuolo to within three points of safety with six games remaining while Atalanta have dropped to eighth in the Serie A table.
The visitors went into the contest in Bergamo after three straight defeats.
Atalanta created the first chance of the game in the 12th minute, with Marcelo Estigarribia's stinging drive from outside the area forcing Sassuolo goalkeeper Gianluca Pegolo to make a save.
The hosts went even closer to breaking the deadlock in the 27th minute when German Denis fed Giuseppe De Luca in the box.
His right-footed shot, however, was kept out by Pegolo.
Sassuolo took 30 minutes to create their first chance, but it almost resulted in a goal.
Domenico Berardi got past his marker and headed Alessandro Longhi's cross just over the bar.
Sassuolo grew in confidence and took the lead three minutes later.
Atalanta's defence failed to clear a dangerous corner and Sansone hit the ball past goalkeeper Andrea Consigli.
Before the interval, Consigli kept out Berardi's hard drive from 30 yards.
With Atalanta struggling to break Sassuolo's well-placed defence, Sassuolo doubled their lead in the 71st minute.
Sansone's curled free-kick towards the bottom right corner of goal beat Consigli.
The hosts wasted a good chance to reduce the deficit soon after when Estigarribia struck wide from a good position.
Sassuolo held on for their sixth win of the campaign and only their second in 13 games.