Moise Kean earned the credit for the Bianconeri's winning goal in the first half as Rodrigo Bentancur's header deflected off his forehead and in.
Tammy Abraham thought he had equalised, turning a loose ball into the back of the net after Szczesny brought Henrikh Mkhitaryan down in the box, but the whistle had already gone to award Roma a spot-kick, which Jordan Veretout saw the Juventus goalkeeper parry aside.
The result sees Massimiliano Allegri's side move up to seventh in the Serie A table, just one point behind Roma, who remain fourth.
Roma started the brighter of the two sides, Gianluca Mancini testing Szczesny with an early headed effort, but went behind in the 16th minute as the hosts scored with their first attempt of the game, Bentancur heading the ball against Kean and in following Mattia De Sciglio's deep cross from the left.
The visitor was left frustrated as the referee blew his whistle to award it a penalty - confirmed after a VAR review - for Szczesny's foul on Mkhitaryan just moments before Abraham found the net, with Veretout's subsequent spot-kick saved by the Poland international.
Shortly after the restart, Federico Bernardeschi's spectacular bicycle kick was spilled into the path of Kean by Rui Patricio, but the striker blazed the loose ball over the bar from inside the six-yard box.
A second VAR penalty check was conducted when Lorenzo Pellegrini went down in the box as he and Giorgio Chiellini swiped at a loose ball, but this time Jose Mourinho's men were denied a spot-kick and were unable to find an equaliser, slumping to their third defeat of the season.