You would have sensed the foreboding among the knots of Warriors fans in the Stadio di Monigo as dark thunderclouds rolled across the Veneto plain, spitting lightning as they came.

But it was not the deluge they feared, rather the possibility that Treviso, who led for much of this fraught contest, would reverse their run of dismal home form and eke out a result that owed more to Glasgow's nerves than their own silky skills.

But reassurance came in a familiar shape for the far-travelled Scottish supporters. They have not seen much of DTH Van der Merwe this season – in fact, his only action was for Canada in the World Cup, where he picked up a serious shoulder injury – but they celebrated his return to club colours when he arrived as a replacement in the final quarter of the game and delivered the slick try that swung the result Glasgow's way.

The scenario now is that a draw or win against Connacht at Firhill on May 5 in their final regular-season game will earn them the RaboDirect PRO12 play-off place they covet. There is also a better-than-slim possibility that they could finish third in the table and avoid an away trip to Leinster for their semi-final. But, as coach Sean Lineen is fond of saying, they will focus on the task in hand rather then be distracted by what-ifs.

That, in essence, was what they did here. Lineen's side was up against it in almost every way – hostile crowd, a referee who gave them few favours, conditions that made handling awkward – but they dogged out their win in marvellously pragmatic fashion. It was a momentous team effort, although it will deservedly be remembered for Van der Merwe's fairytale finish near the end.

It came in the 76th minute when he accepted the ball on the blindside of a ruck, 40 metres from the Treviso try-line. Nothing looked on, but the winger has a habit of making something from nothing in these situations. Van der Merwe put his foot on the gas, split the defence with a killing burst of pace then rounded Brendan Williams for his touchdown.

Graeme Morrison, returning to action after a three-week lay-off, had actually joked about Williams looking younger every year, but it was no laughing matter when the full-back – he was only listed on the wing to satisfy the Italian Federation's stricture against foreign players in key positions – reeled back the years and rocketed down the right touchline to collect the opening try. Chris Cusiter launched himself at Williams, but got no more than a fingernail on the Australian player as he lit up the afterburners and sped towards his target.

That score came in the 10th minute, but was firmly against the run of play in a game that had been dominated by the driving play of the Glasgow forwards. Glasgow continued to dominate territorially, but Treviso's first-up tackling was fierce and effective, although the ferocity of the contact threatened to escalate to another level in an often fractious contest.

Finally, and unsurprisingly, it did, with an almighty scrap breaking out after half-an-hour. Glasgow had reduced the gap to two points by then by way of a 21st-minute Duncan Weir penalty, but a spot of how's-your-father after a tackle became an outbreak of how's-your-entire-family, and when order was finally restored both Al Kellock and Edoardo Gori, the Treviso scrum-half, were invited to spend 10 minutes on a peace mission to the sin bin.

Their departures lowered the temper levels but they did nothing to raise the overall standard of a game that was disturbingly low on quality. Stuart Hogg produced a few classy touches, the best being a 90-metre touchfinder that trickled out near the right corner flag. Hogg also ignited the 57th-minute break that, after a powerful run by Alex Dunbar and another lengthy scuffle, brought the penalty that allowed Weir to nudge the Warriors in front for the first time.

Scotland's humiliation in Rome last month would have been a lot worse had Italy had a better fly-half than Kris Burton, and Glasgow could be grateful that Treviso fielded the same fellow in the pivotal position yesterday.

In general terms, Burton struggled to impose shape on his side's game, embroidering – if that's the word – his efforts by sclaffing two dropped goal attempts wide, despite having enough time over both to adjust his hair, tie his bootlaces and check that the wind was just right.

Then again, Glasgow's efforts did not exactly add up to a masterclass in half-back play, with Chris Cusiter looking particularly out of sorts at scrum-half. It was noticeable that the Warriors' tempo moved up a couple of notches when Henry Pyrgos replaced Cusiter after 50 minutes, although Glasgow seemed to acquire more urgency throughout their time at that point.

More, still, when Van der Merwe arrived on the scene in the 63rd minute. The Canadian's first contribution was a piledriver tackle on a Treviso straggler, while his second was a towering catch-and-kick from just outside his 22. Burton put Treviso in front with a 72nd-minute penalty, but Van der Merwe's magic moment was not long in coming.

The Glasgow fans were still celebrating when Burton brought proceedings to a close with his knock-on just past the 80-minute mark.