Ruel Sotiriou’s 10th-minute goal looked to have secured Orient a big away win.
But Phillips equalised in the 88th minute and, after Tykes team-mate Luca Connell saw red, he bagged a winner five minutes into added time.
The visitors went ahead when George Moncur drove to the byline and cut the ball back to Sotiriou who applied the finish.
Barnsley dominated possession and chances for the rest of the game but could not find a way past the inspired visiting goalkeeper Sol Brynn.
But the resistance was ended when Mael De Gevigney launched a ball in behind the Orient defence and Phillips flicked a header over the onrushing Brynn.
Connell was shown a second yellow card as he protested to the referee that Orient were taking too long to restart the game.
But despite the numerical disadvantage, Phillips won it for his side when he connected with Corey O’Keefe’s free-kick from the right and turned it in for his second.