Petr Cech made a string of second-half saves as Chelsea hung on to edge past a rejuvenated Crystal Palace and move within two points of leaders Arsenal.
Fernando Torres tapped in to put the Blues ahead at Stamford Bridge after Willian's shot rebounded off a post.
Palace equalised via Marouane Chamakh's volley from a Joel Ward cross before Ramires curled Chelsea back in front.
Chamakh in the goals
For the first time in his career, Morocco striker Marouane Chamakh has scored in three consecutive league appearances
Cech denied Jason Puncheon, Damien Delaney and, crucially, Stuart O'Keefe as the hosts scraped to victory.
That said, the home side had two glorious late chances to relieve the tension, only for Ramires to miscue on both occasions.
Boss Jose Mourinho said Chelsea
were "in trouble"
after losing at Stoke last weekend, but they are now within touching distance of the top.
While it is a contrasting picture for Palace, who remain in the relegation zone, they should take heart from another encouraging performance.
The improved organisation and confidence they have shown since
Tony Pulis took over as manager
last month was evident throughout - and they will be disappointed that a sequence of three wins in four games and four clean sheets in five matches has come to an end.
Mourinho enjoying Chelsea 'transition'
With a well-drilled back four, the calming influence of captain Mile Jedinak in midfield and a two-pronged attack in Chamakh and Cameron Jerome, the Eagles posed a constant threat.
But their impressive work was undone when Willian was given too much time and space to produce a low strike that Julian Speroni pushed on to a post, Torres reacting quickly to convert the rebound.
Branislav Ivanovic then drilled narrowly wide for the hosts from an acute angle after collecting a Juan Mata backheel and bursting into the box.
But Palace maintained their composure as Chelsea struggled to establish a consistent tempo, and they were rewarded when Ward's left-wing centre was guided into the bottom corner by Chamakh.
The equaliser was deserved but Chelsea's creative players gradually started to increase their influence - Willian, Mata, Eden Hazard and the ever-energetic Ramires linking effectively with lone striker Torres.
Pulis banks on Palace home form
It was Willian and Hazard who combined to tee up Ramires and he restored the hosts' advantage with a superb bending effort that Speroni, unsighted by defenders, could do nothing to keep out.
Willian squandered a chance to extend the lead before half-time and it was Palace who rallied after the break, Cech beating away a Puncheon shot before saving Delaney's header.
They continued to push for an equaliser as Chelsea continued to labour - even with Oscar now on the pitch - and substitute Yannick Bolasie and Delaney headed off target from promising positions.
Cech made a brilliant one-handed stop to thwart O'Keefe before Ivanovic scrambled clear, before Delaney again went close with a header.
The home fans grew restless and their team responded, Ramires scuffing a pass that would have meant a tap-in for a team-mate and shooting wide after Speroni denied Andre Schurrle and Demba Ba.
But Chelsea came through and can now focus on Tuesday's League Cup quarter-final at Sunderland.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.