Earlier in the day, Thilina Kandamby (53) and Angelo Mathews (52) hit crucial knocks as Sri Lanka recovered from a poor start to put 212 runs on board.
An excellent opening spell by Anderson and Graham Onions (2-58) under overcast conditions reduced Sri Lanka to 17 for four in just 5.2 overs before Kandamby and Mathews led the fight-back with their 82-run stand for the sixth wicket.
The match also witnessed a rare sporting gesture by England captain Andrew Strauss, who allowed Mathews to continue with his innings even after he was run out.
Mathews turned Onions to the square-leg for the first run and while attempting the second collided with the bowler and wicket-keeper Matt Prior effected a run out.
Matthews stood his ground and started his walk back to the pavilion, but Strauss stunned everyone by calling the Sri Lankan back. But Matthews couldn't make the most of the opportunity as he added just one run more before being caught behind off Luke Wright.
Matthew hit six fours in his 73-ball knock while Kandamby smashed five in his 82-ball stay before being run out.
After the loss, Sri Lanka slipped to the second place in Group B with England on top. Hosts South Africa and New Zealand are third and fourth respectively. The top two teams will qualify for the semi-final.