The Mexican driver took advantage of a pitstop under the safety car to emerge in the lead after Verstappen had led the early phases of the race from polesitter Charles Leclerc.
Leclerc led away at the start line from Verstappen and, without DRS being made available in the opening series of laps, was able to hold a scant lead over the two-time champion.
But at the end of the third lap, Verstappen breezed past the Ferrari driver thanks to the great speed advantage of his Red Bull with DRS active, and led into the first corner of the fourth lap.
Leclerc quickly fell out of range and was soon easy pickings for Perez, who then immediately began to chase after Verstappen in his efforts to secure a second career victory at the Baku circuit.
Perez had homed to within DRS range of Verstappen, but the race was interrupted to pause the sprint race winner's progress when Nyck de Vries crunched his front-left wheel against the inside wall at Turn 6, and stopped on track.
Verstappen pitted in response, but the emergence of a lap 11 safety car as the marshals tried to clear de Vries' stranded AlphaTauri ensured that his side of the garage had somewhat mistimed the call - the safety car emerging when Verstappen was exiting the pitlane.
This gave Perez and Leclerc the chance to take cheaper pitstops under the safety car, allowing them to emerge from the pitlane in front of Verstappen once they'd collected their fresh hard tyres.
Source: Autosport