The strike came after Ángel Lafita's goal in the 86th minute had given Azulones every reason to think they would escape with a victory.
Martínez headed home from an Alberto de la Bella cross.
Lafita plied his trade for 89 minutes during the match. He scored one, took three shots and completed 25 passes.
Lafita demonstrated his rapport with Mané throughout the match, and connected with the defender for six passes.
Real Sociedad had possession for 60.5% of the contest.
Real Sociedad had 10 shots, including three on target.
The most effective of Erreala's three substitutions was David Zurutuza, who, after replacing Xabi Prieto in the 67th minute, took two shots.
The combination of Martínez to Asier Illarramendi was the most common during the match, as the two players connected 14 times.
Getafe controlled the ball for a mere 39.5% of the contest.
Getafe had 15 shots, including two on target.
Jaime Gavilán made his mark on the match for Geta after coming on for Abdel Barrada in the 85th minute, as he assisted Lafita's goal.
The five attempts by Pedro León were the most of any Getafe player.
Mané's 13 passes to Lafita were the most of any Getafe team-mates during the match.