Willian’s free-kick on 13 minutes eluded Lee Grant at the near post to give Chelsea the lead.
Stoke equalised through Jonathan Walters’ penalty after the Irishman was fouled by Cahill.
Marcos Alonso’s free-kick hit the bar and Grant denied Pedro as Chelsea sought to restore their lead.
Their efforts were rewarded when Cahill reacted quickest to a loose ball in the area after a corner 12 minutes before the end.
Phil Bardsley’s red card compounded matters for Stoke, who stay ninth.