Philander trapped both openers lbw in the 13 overs left on the fourth day after South Africa was bowled out for 351 at Lord's.
Philander, who has 2-4, also made 35 useful runs for the Proteas, for whom Hashim Amla hit an elegant 121 before Steven Finn took 4-74 to give the hosts a slender chance.
England will have to surpass its highest successful run chase of 332 to level the three-match series at 1-1 and hold off South Africa's surge to the top of the test rankings. That was achieved in in 1928 against Australia.
Brief scores:
South Africa 1st Innings: 309 (JP Duminy 61, Vernon Philander 61; Steven Finn 4-75, James Anderson 3-76, Graeme Swann 2-63).
England 1st Innings: 315 (Jonny Bairstow 95, Ian Bell 58, Swann 37 not out; Morne Morkel 4-80, Dale Steyn 4-94).
South Africa 2nd Innings: 351 (Hashim Amla 121, AB de Villiers 43; Finn 4-74, James Anderson 2-73, Stuart Broad 2-85, Swann 2-94).
England 2nd Innings: 16-2 (Philander 2-4).