With the home side in the ascendancy, Morata came off the bench and doubled his side's lead by deftly flicking a cross through the goalkeeper's legs in the 70th minute.
"Juventus has given so much to all of us and there are moments in life when it is time to give back. Now we need to stay close to this club, and we will come out of it together," Juve captain Giorgio Chiellini said after the match.
Juventus remain seventh with 24 points from 15 games, seven adrift of the top four and 11 behind leaders Napoli, while Salernitana are bottom with eight points.
It has been a difficult week for Juves on and off the pitch, as the team suffered two straight defeats and on Saturday Italian finance police searched the club's offices as part of an ongoing investigation into player trading.
Dybala looked lively from the start, twice testing goalkeeper Vid Belec from distance, and opened the scoring after 21 minutes by arrowing a shot into the bottom corner.
Juve almost had a second before the break, but Chiellini's effort was disallowed for offside in the build-up.
Salernitana started the second half stronger, however, and spurned a huge chance when Ranieri was left unmarked in the box but hit the woodwork.
The visitors' nerves were settled after Morata cleverly diverted a low cross through Belec's legs at the front post with a flick of his boot.
Max Allegri's side had the better late chances, with Belec denying Dybala one-on-one before the Argentina international slipped as he took a last-gasp penalty, firing his effort well over the bar.