"On account of our second half display, we deserved to lose," Spalletti candidly told Sky Sport.
Roma travelled to Bergamo under pressure after Juventus opened up a sizeable gap at the top of the pile with a 3-0 rout of league newcomers Pescara on Saturday.
But Spalletti's men were incredibly profligate in a dominant first half in which Edin Dzeko and Mohamed Salah missed a number of chances before Diego Perotti put the visitors ahead from the spot on 40 minutes.
Salah spurned a potential game-changer minutes later after he ran on to another great delivery by Radja Nainggolan only to fire straight at Etrit Berisha from point-blank range.
Roma's reputation for running out of steam after such one-sided opening halves gave ideas to the hosts.
Spalletti added: "They were angry at the end of the first half but Atalantadid well to lift the pace of the game in the second period."
Atalanta were indeed fired up, but conjured their equaliser on the hour in bizarre circumstances.
Roma goalkeeper Wojciech Szczesny was forced into action to thwart aKessie cross but palmed it on to Mattia Caldara’s face, the ball ricocheting into the net.
Roma were stunned, but Atalanta were revived.
A Kessie drive was blocked and when Alejandro Gomez went on a mazy run he left Kostas Manolas grounded before seeing his cross nodded out of danger by Antonio Rudiger.
Dzeko has been in fine form for Roma with 10 goals in 12 games but the towering Bosnian's appeal for an unlikely penalty was waved away when he clashed with Roberto Gagliardini.
It was another sign of Roma's desperation, and Atalanta continued to press.
Remo Freuler's deflected strike on 76 minutes came off the near post and into the welcome arms of Szczesny and Gagliardini's drive was goalbound until Federico Fazio got in the way.
The hosts were not to be denied, though.
When Leandro Paredes tripped the lively Gomez in the area, Kessie, 19, stepped up to send Szczesny the wrong way to secure Atalanta's sixth win in their past seven outings.
It moved Gian Piero Gasperini's men up to fifth, one point ahead of Napoli and only eight behind Juventus.
"We spent the first half watching Roma, who had a few chances, but I asked the lads to take it up a notch in the second," said Gasperini, who admitted their purple patch has lifted the whole town.
"It's really pleasing to see how enthusiastic everyone is. We haven't seen anything like it in Bergamo for years."
Roma's first defeat in seven games gives AC Milan the chance to move up to second place if they beat city rivals Inter in the derby later Sunday.
Elsewhere, Felipe Anderson's 11th-minute strike set Lazio up for a 3-1 home win over Genoa, who saw Lucas Ocampos level on 52 minutes before Lucas Biglia, from the spot, and Wallace added two more for the hosts.
Bologna moved up to mid-table position with a 3-1 win over Palermo, while Italy striker Andrea Belotti's purple patch continued with a brace in a 2-0 away win at basement side Crotone that kept Torino seventh.
Fiorentina are just two points behind Torino in eighth after a 4-0 romp at Empoli, where Federico Bernardeschi and Josip Ilicic, with one from the spot, hit a double apiece.
Earlier, Fabio Quagliarella scored his 100th Serie A goal and set up Luis Muriel for an unlikely, late double as Sampdoria completed a dramatic 3-2 come-from-behind win at home to Sassuolo.