Roma entered the match off the back of successive 1-0 wins over Torino and Crotone, and the same scoreline in Rome brought Eusebio Di Francesco's team another three points.
The result has seen the capital club move onto 24 points in the Serie A table - just four points off the league leaders Juventus.
It took until the 28th minute for either team to create a clear opportunity, with Edin Dzeko heading just wide of the Bologna post, before the visitors came close themselves - Adam Masina's header bringing a smart save from Roma goalkeeper Alisson.
It was the home side that made the breakthrough in the 33rd minute, however, when El Shaarawy created space inside the Bologna box before finding the bottom corner with a smart finish.
Roma thought that they had doubled their lead early in the second half when Dzeko converted from close range, but the former Manchester City striker saw the offside flag raised.
Bologna pressed players forward in the latter stages as the visitors searched for an equaliser, but Roma, who came close again through Dzeko in the 77th minute, closed the game out to record their eighth league win of the campaign.
Next up for Roma is a home game against Chelsea in the Champions League on Tuesday night - 13 days on from their 3-3 draw at Stamford Bridge.