On-loan striker Rodri scored in either half, either side Sebastian Dubarbier's own goal just after the hour which levelled proceedings, to put Almeria on course for the three points in their Primera Division opener.
But Villarreal new boy Dos Santos equalised seven minutes from time before substitute Pereira sealed a dramatic victory for the Yellow Submarine soon after.
Villarreal took four points off Almeria in the Segunda Division last term, but were beaten 1-0 by the same opponents in the close season, going down to a second-half penalty.
It was Marcelino Garcia Toral's men who started this encounter in positive fashion with Hernan Perez and Soriano Bruno only just missing the target from outside the area.
Clear cut chances were at a premium in the opening stages although Bruno Soriano should have done better with a header from Dos Santos' corner, which was comfortably saved by Almeria goalkeeper Esteban.
Against the run of play, however, Francisco Rodriguez's men took a 37th-minute lead when Rodri converted from Rafita's right-wing cross.
Dos Santos headed wide just before the interval, while Mario Gaspar's drive from distance was easily saved by Esteban as Villarreal looked to level proceedings.
Their endeavour was rewarded in the 65th minute, albeit somewhat fortuitously, as Almeria defender Dubarbier's attempted clearance from Pereira's cross sailed into the net.
Yet the hosts re-took the lead nine minutes later thanks to another close range finish from Rodri.
The Barcelona B striker found the top corner following a cross from Suso, who is also on loan at Almeria this season.
However, their lead was short-lived as Dos Santos equalised in the 83rd minute, slotting home from six yards following Javier Aquino's cross from the right wing.
And the goalscorer turned provider three minutes later to turn the game on its head, with the former Barcelona and Tottenham midfielder finding Pereira, who drilled past Esteban.