The pair found each other on track shortly after half distance, briefly battling for fourth place on track.
Hamilton drew alongside his Red Bull rival under braking for Turn 12, the left-hander leaving the long back straight.
They then ran wheel-to-wheel through the next three corners, Perez only reclaiming the initiative into Turn 1 at the start of Lap 35.
“It was pretty intense at that point, because I think Lewis really got me at my worst time of my race today because I was struggling so much with my tyres at that point,” the Red Bull driver explained.
“That first stint was so difficult for me, especially towards the end, and Lewis was pretty fast – I think he was, at the time, the fastest car on track.
“So to hold him back at that point was pretty challenging.”
Perez started the race sixth, though moved by Pierre Gasly and Fernando Alonso at the first corner to climb to fourth.
He remained there until his stop, barring Lap 34 when he crossed the line half a car length behind Hamilton.
The Mercedes driver meanwhile climbed quickly from 11th on the grid, sitting ninth by the end of the first lap and fifth by Lap 14.
Hamilton then reeled in Perez, launching at attack which resulted in arguably the best exchange of the season to date.
“We had a good fight – had to go [off track] even and avoid the pit bollard on pit entry,” Perez recounted.
“But it was a good fight overall and [I] managed to stay ahead.”
The weather in Istanbul remained wet but changeable throughout the race, with tyres going through phases as conditions changed.
That saw some drivers struggling at different points, most noticeably a few laps after their stop as they battle graining.
Perez made his only stop on Lap 37, a lap after team-mate Max Verstappen took service, rejoining fifth.
He then made up ground when Charles Leclerc gambled on reaching the end without pitting, while a late stop for Hamilton left him in a similar position.
“I think it was the right call when we boxed because I had the time to really introduce my tyres and really learn what went wrong on my first stint, to try to apply it for my second stint, which really made my race,” Perez said.
“I think we took a good advantage on that second stint.”
Perez finished third behind Verstappen and race winner Valtteri Bottas, his first podium in nine races.
Hamilton meanwhile fell to fifth, the team's call to pit him with eight laps remaining arguably costing him a shot at stealing the final podium position away in the closing laps.
The Circuit of The Americas hosts the next round of the championship, the United States Grand Prix on October 22-24.