It was a scrappy first half with chances few and far between, but the hosts almost snatched the lead when Alberto de la Bella's left-footed drive drifted narrowly wide in the 22nd minute.
The second half was barely a minute old when Sociedad went back on the attack. Diego Ifran picked up a through ball from Pardo, but could only drag his shot wide to the right.
Getafe had their first significant chance of the game in the 53rd minute when Alberto Lopo gained possession inside the six-yard box, only to miss the target.
Getafe were very much on top in the second period, though it was not all one-way traffic. David Zurutuza struck high and wide at the other end after picking up Antoine Griezmann's cross as the hosts begin to bite back.
Just when the game looked destined for a draw, late drama ensued. Lafita thought he had won if for Getafe when he headed in Jaime Gavilan's cross in the 86th minute, but there was another twist to come.
De la Bella swung a cross into the box as stoppage time took hold, and Martinez headed home a last-gasp equaliser to rescue a point for Sociedad.