Gala scored the only try and Heriot's failed to steal the points when the home side denied Graham Wilson a drop goal attempt deep into injury time - two incidents that summed up the desire of all the players on the field.
There were few frills; it was more a match of guts and determination which hung in the balance until referee Peter Allan's final whistle.
"It was a win and that was all I was interested in," said George Graham, the Gala coach. "It was a tough match, and we showed a lot of character to dig in and come through in the end. I have often said that the game is all about performance and the result will take care of itself. Today, it was all about the result."
Despite the defeat, his opposite number Phil Smith said that his players remained contenders for the championship. "I was disappointed and I felt that perhaps we necessarily did not deserve to win," he said. "But the game got what it deserved . . . a pretty close scoreline. We just felt disappointed, too, that we did not get a final chance at it. Graham [Wilson] got in the pocket to have at least a shot at the drop goal, and for three phases he was ready. That was all he needed, and I accept that it would have been a steal, but it never came."
It looked as if it would be the visitors' day when they led 9-8 after Wilson kicked a penalty which saw Gala's Chris Weir sent to the sinbin. But then Ewan Scott, who has taken over the kicking role from Lee Millar, now with London Scottish, scored a penalty in front of the posts.
The early pressure had come from Heriot's and Cammy Fergusson broke to threaten the first points, but Gala drew first blood when the visitors came in at the side and Scott kicked his side ahead in 11 minutes. Heriot's had most of the pressure, but were unable to break the Gala defence on the wet, slippery surface.
The home side increased its lead with the opening try after four minutes of the second half when Grant Somerville switched quickly to the right wing and used his strength to stretch out for the try. Scott missed the conversion from close to the touchline, so Gala could not afford to relax and Wilson made no mistake with his second penalty to narrow the scores to 8-3 before Gala brought on Zimbabwean Gerald Sibanda for his first game after his lengthy injury lay-off. Heriot's, however, were aware of the threat and the winger was well stifled.
Andy McLean went close for Gala, but the game was wide open yet again when Wilson kicked his second penalty to cut the deficit to just two points. Heriot's dug in deep and, after Somerville had cut open the defence in a crossfield break without success, Wilson hit the post with a penalty.
The game changed when Gala had Chris Weir yellow-carded in 65 minutes and Wilson kicked Heriot's ahead for the first time. Scott missed from the other end, but made amends to put Gala back in front 15 minutes from the end and secure victory.