Gallagher was coolness personified as her buzzer beater ensured that the game would be thrillingly tied at 43 goals apiece.
Both sides came into this game in search of their second victory of the tournament, and history was on the side of the Caribbean nation, who had triumphed in each of the nine previous World Cup meetings.
Any thought that a tenth victory would be a foregone conclusion was soon dismissed, though, as Scotland fought for every ball during a first quarter in which the lead repeatedly changed hands.
Trinidad’s first shot rebounded off the post, so it was Emma Barrie who opened the scoring with a brace, but then saw her next shot miss the target.
Samantha Wallace opened Trinidad’s account, while good defensive work from Daystar Swift temporarily halted Scottish progress, allowing her side to pull the score back to 4-3.
Gallagher fired in her fourth consecutive goal to give Scotland a 6-4 advantage, and although Trinidad and Tobago were keeping pace, a series of loose passes allowed Scotland to maintain their two-goal margin as the first quarter came to a close with the Thistles 11-9 ahead.
Trinidad and Tobago then took their turn to capitalise on mistakes early in the second quarter, moving into a 14-13 lead. Scotland brought the scores back level, and despite a marvellous leaping interception from Candice Guerero, were then able to push out and re-establish a two-goal lead at 19-17.
The Calypso Girls roared back as the lead changed hands again, but the seesaw nature of the contest continued. Kalifa McCollin’s missed shot gave Scotland the narrowest of advantages at half time: 22-21.
The record-breaking Rhonda John-Davis assumed wing attack duties after the break, and momentum swung again, as Trinidad and Tobago earned themselves a two-goal lead.
As with everything in this match though, that didn’t last for long, and a misunderstanding in the Trinidadian circle allowed Scotland to forge a lead of their own before a breathless quarter ended 34-34.
The Thistles started the fourth quarter on top, making the most of an interception to take their lead out to two. Carelessness in possession by the Thistles let Trinidad and Tobago back in, though, and they then took their opportunity to build a lead.
Gallagher registered her first miss with five minutes left, and the task looked to be beyond Scotland as the Calypso Girls’ lead stretched to 42-39. Emma Barrie got Scotland back to within two, before the nerves began to show on both sides, with neither team able to stamp their authority on an increasingly scrappy final period of the game.
Scotland drew level through Barrie with 45 seconds left, but the Trinidad and Tobago lead was restored by Wallace with the clock rapidly ticking down. It was boom or bust for Scotland now, and they worked the ball down the court to Gallagher, who was awarded a penalty as the dying seconds dwindled away.
As the hooter sounded, there were jubilant cheers from the Thistles’ fans as Gallagher, shooting from the left side, sank the game-tying goal, ending an enthralling contest.
Despite the late rally, Scotland finish sixth in Group G, and will play Barbados in the 11th-place play-off, while Trinidad and Tobago will contest a ninth-place finish with Northern Ireland.
Scotland’s Lynsey Gallagher said:
“I heard the crowd roar and I knew it was a penalty pass or shot, so I just needed to take my time and put it away.
“I think it was a bit of ping pong at the end. It’s hard to win ball off Trinidad and Tobago and we just had to treasure the ball. Sometimes it was just the final execution of things – things that you know you do day-in, day-out, but I think that was just part and parcel of that game.”