Atal reduced the arrears after the hosts had fallen 2-0 behind following goals by Karl Toko Ekambi and Houssem Aouar, before earning a penalty converted by Andy Delort for the equaliser and Guessand netted the winner two minutes into stoppage time.
Lyon had the game firmly in their grasp for more than an hour before losing control in a thrilling finale with Tino Kadewere picking up a straight red card five minutes from time.
Christophe Galtier's Nice are third with 19 points from 10 games, eight behind leaders Paris St Germain who travel to bitter rivals Olympique Marseille later on Sunday and two behind RC Lens who thrashed Metz 4-1.
Lyon are seventh on 16 points from 11 matches.
"I don't know what happened. We just blew a fuse. It's not the first time and it needs to change," said Lyon defender Leo Dubois.
The visitors started well before losing their composure.
That spurred Nice into action and it took two superb saves from Anthony Lopes to deny Delort and Dolberg before the interval.
Nice, however, did not give up and they pulled one back nine minutes from time, Atal beating Lopes with a fierce shot into the roof of the net after dribbling past Jerome Boateng.
Kadewere was sent off four minutes later for a brutal tackle on Melvin Bard.
Three minutes from time, Atal was brought down by Emerson and Delort knocked in the penalty.
Guessand struck the final blow two minutes into stoppage time after being superbly played through by Alexis Claude-Maurice, slotting the ball past Lopes with a low shot.