Somerset 229 for 6 (Gregory 62, Trego 60, Barber 3-37) beat Middlesex 174 for 6 (Eskinazi 55, Gregory 4-28) by 38 runs (DLS method)
Trego smashed 60 off 31 balls, including 24 off an over from Ashton Agar, to relaunch his side's innings after left-arm seamer Tom Barber had taken three wickets in an over to reduce them to 29 for 3.
Skipper Gregory then took up the attack with an even more destructive 62 off 28 deliveries, receiving good support from Corey Anderson (41 not out) as the Middlesex bowlers were dispatched to all parts of the ground.
In reply, the shellshocked visitors had made 88 for 4 from ten overs when rain interrupted their innings for the second time. They faced a revised target of 213 from 18 overs, with a required run-rate of around 16 an over, and, despite a 29-ball fifty from Stevie Eskinazi, fell well short at 174 for 6.
After losing the toss and making a bright start, Somerset looked to have slipped into trouble when Barber, generating good pace, removed Steve Davies, Johann Myburgh and James Hildreth in the third over of the innings.
But Trego and Tom Abell set about rectifying the damage with panache, Trego leading the way with seven fours and three sixes in a typically savage onslaught before falling in the 11th over with the total advanced to 112.
Abell followed for a comparatively sedate 31, but the importance of his stand with Trego was emphasised when Gregory and Anderson had the freedom to cut loose from the start of their innings.
Gregory was in magnificent form, striking eight fours and four sixes, and outshining the powerful Anderson, who still managed to contribute three sixes in his 24-ball innings.
Max Waller began the Middlesex reply with a wicket-maiden, the legspinner having Max Holden caught at extra cover for a duck.
Gregory then cemented his claim to Man-of-the-Match by dismissing Nick Gubbins and Eoin Morgan in his first two overs as their side reached 50 for 3 at the end of the six-over Powerplay, actually one ahead of Somerset at the same stage.
Paul Stirling had looked the one early batsman capable of making a game of it before he fell for 30 to a sensational boundary catch by Jamie Overton, catching the ball, releasing it as he fell back over the rope and re-entering the playing area to grab it.
Just before the rain first arrived, with Middlesex 74 for 4, a spectator was struck by a six from Eskinasi off Roelof van der Merwe. Medical staff were quickly on the scene and as the players looked on with obvious concern the drizzle increased and sent them to the dressing rooms.
After a short delay the game resumed, only to be interrupted again after a couple of overs by a heavier downpour. The final session saw Gregory remove John Simpson for 29 and Eskinazi for a valiant 55 off 32 balls, for figures of 4 for 28.