Smalling headed home in the 75th minute after a brilliant free kick by Lorenzo Pellegrini from about 44 yards.
Inter defender Federico Dimarco opened the scoring in the 30th minute when Nicolo Barella met him with a pass in the middle of the box, with his low strike taking a deflection off keeper Rui Patricio but still reaching the corner of the net.
Roma netted an equaliser through forward Paulo Dybala nine minutes later, his fourth goal in Serie A this season, following a superb cross by defender Leonardo Spinazzola.
Inter striker Edin Dzeko had scored in the 11th minute as Roma's defence faltered but his goal was chalked off by the VAR for offside.
Roma, who are fourth in the table with 16 points after eight games, host 15th-placed Lecce on October 9 while Inter, seventh on 12 points, travel to 11th-placed Sassuolo next Saturday.