Perez claimed his first victory on the streets of Monte Carlo ahead of Carlos Sainz after a late start due to heavy rain and the loss of further time following a big crash for Mick Schumacher, who was fortunate to walk away unharmed.
Leclerc had started on pole but could only finish fourth after paying the price for poor Ferrari pit-stop strategies and so Max Verstappen extended his lead over the Monegasque to nine points in the battle for the title after taking third.
Verstappen’s Red Bull-mate Perez took the chequered flag in the sun on lap 64, as there was not enough time to complete the full 77 in the Principality as a result of the poor weather earlier in the day.
There was eventually a rolling start behind the safety car an hour and 10 minutes after the race was due to begin, with the red flag having earlier been waved during a deluge.
Leclerc maintained his lead ahead of team-mate Sainz on a drying track ahead of a Red Bull duo of Perez and Verstappen.
Perez pitted from fourth place for a set of intermediate tyres before both Leclerc and Verstappen came in for intermediates.
Leclerc was not happy when he was called in again at the same time as Sainz for hard tyres only three laps later, with Red Bull also opting for a double stack soon after and it was Perez who was leading after a string of pit stops.
The second-placed Sainz produced a great save to avoid crashing into the barriers on a wet part of the track, but the virtual safety car was deployed and subsequently another red flag following a big smash for Schumacher on lap 26.
Leclerc found himself in fourth behind Verstappen following some puzzling decision-making from the Scuderia and there were only 40 minutes of racing to go when the race restarted again on a significantly drier track.
Perez pounces for a dream win
That is now four wins in a row for Red Bull, with Verstappen having reeled off three on the spin before Perez continued the sequence with his third Formula 1® victory, making him the most successful Mexican driver in the sport.
Ferrari only have themselves to blame after Leclerc started on pole alongside Sainz and it is now Red Bull leading the constructor standings by 36 points.
While a flat Leclerc said "no words, we cannot do that" over the car radio after another one that got away on home soil, an ecstatic Perez celebrated with his team and he is only six points adrift of Leclerc.
More Monaco woe for Leclerc
There has certainly been no home comforts for Leclerc, who was due to start on pole last year but did not make it to the grid due an issue with the left driveshaft of his car.
The Monegasque was able to start from pole on this occasion following a lengthy wait, but it all went badly wrong as Ferrari squandered a position of dominance.
Leclerc was perplexed to be called into the pits for the second time in succession and although he picked up his first points at his home race, that was no consolation a week after he retired when leading in Barcelona.
IN THE POINTS
1. Sergio Perez (Red Bull)
2. Carlos Sainz (Ferrari) +1.154s
3. Max Verstappen (Red Bull) +1.491s
4. Charles Leclerc (Ferrari) +2.922s
5. George Russell (Mercedes) +11.968s
6. Lando Norris (McLaren) +12.231s
7. Fernando Alonso (Alpine) +46.358s
8. Lewis Hamilton (Mercedes) +50.388s
9. Valtteri Bottas (Alfa Romeo) +52.525s
10. Sebastian Vettel (Aston Martin) +53.536s
1. Max Verstappen (Red Bull) 125
2. Charles Leclerc (Ferrari) 116
3. Sergio Perez (Red Bull) 110
4. George Russell (Mercedes) 84
5. Carlos Sainz (Ferrari) 83
1. Red Bull 235
2. Ferrari 199
3. Mercedes 134
4. McLaren 59
5. Alfa Romeo 41
There will be a weekend off before the Azerbaijan Grand Prix in a fortnight.