West Ham were looking to bounce back from their 2-0 loss to Bayer Leverkusen in the Europa League on Thursday night, but Pereira netted a brace for Marco Silva's side to secure all three points for the visitors.
The result has seen Fulham rise into 12th position in the Premier League table, while West Ham stay eighth, two points behind seventh-placed Manchester United.
West Ham had a chance to make the breakthrough in the fourth minute of the contest, with Bernd Leno pushing a shot from Vladimir Coufal straight into the path of Michail Antonio, but he fired over the crossbar.
Lucas Paqueta then struck into the side-netting in the spell that followed, with West Ham on top early on, but it was Fulham that made the breakthrough in the ninth minute through Pereira.
Konstantinos Mavropanos could only clear a cross from Alex Iwobi into the path of Pereira, and the former Manchester United attacker finished into the back of the net to send the visitors ahead.
Pereira had another chance shortly after, but he fired wide of the target from the edge of the area, with West Ham struggling from a defensive point of view; James Ward-Prowse did have a strike down the other end in the 19th minute, although it was never causing Leno much of an issue.
West Ham goalkeeper Lukasz Fabianski kept out another effort from Pereira in the 31st minute, before Coufal missed the target down the other end, with both sides threatening to score the game's second goal.
Fabianski made another smart save to keep out a strike from Willian late in the half, before the home side's stopper denied Rodrigo Muniz from a header, with the visitors finishing the first half on the front foot.
Muniz again had a half-chance early in the second period, with the striker being denied by Fabianski, before the West Ham goalkeeper did brilliantly to deny Iwobi just before the hour after the attacker had attempted to place one into the bottom corner of the net.
Fulham doubled their advantage in the 72nd minute, and it was a second goal of the match for Pereira, who turned a low Iwobi cross into the back of the net, with the West Ham defenders nowhere to be seen.
Muniz had a chance to make it 3-0 to the visitors in the 76th minute, but his effort was kept out by Fabianski, before Mohammed Kudus struck wide of the target down the other end in the 83rd minute.
There was 11 minutes of added time at the London Stadium, but West Ham struggled to launch a response, with Fulham securing all three points in impressive fashion.
West Ham's attention will now switch back to the Europa League, preparing to welcome Bayer Leverkusen for the second leg of their quarter-final next Thursday, trailing 2-0 from the first leg. Fulham, meanwhile, will be aiming to make it successive wins in the Premier League when they host Liverpool next weekend.