The Vikings recovered from 132-7, with Tattersall top scoring with 53, to reach 230 on a slow pitch in Cardiff.
Then, with Glamorgan seemingly cruising to their target, after a 121 opening stand between Hamish Rutherford (58) and Nick Selman (92), three wickets in six balls from George Hill saw them slide to a four-wicket defeat.
Despite defeat, Glamorgan finish top of Group 1 – thanks to a superior net run rate over the eight pool matches – and secured a semi-final place on Monday.
Yorkshire will travel to Essex on Saturday for their quarter-final tie.
“We have been playing some really good cricket in our last few games and it was nice for me to contribute with some runs and to help the team,” said Tattersall. “It was a pretty tricky wicket, but we stuck at it and we got our rewards in the end.
“It showed how tough it was out there when their new batters came in towards the end.
“It was difficult for them to get going and to strike the ball cleanly.
“We knew that a score of around 200 we would be in with a chance if we could take wickets throughout. We got to 230 and it proved to be enough in the end.
“We were nice and tidy in the field and bowled beautifully at times to keep the rate down. We came up trumps in the end.
“Getting Sleman out was a big wicket for us and that made it difficult for them because the wicket was crumbling. We just had a feeling that if we could keep taking wickets, and with the run rate going up to six, that we were right in the game.
“Trying to hit boundaries on that pitch was difficult.”
The visitors got off to a solid start and Will Fraine hit four boundaries on his way to a quickfire 25 before falling to a catch at the wicket by Tom Cullen off Michael Hogan in the seventh over.
James Weighill removed Will Luxton, Harry Duke departed for 20 before skipper Gary Balance was bowled to leave the Vikings 88-4 in the 20th over.
James Cooke clean bowled George Hill with a ball that stayed low and had Matthew Revis caught behind with the next ball.
Dom Bess foiled the hat-trick, but the Vikings were rocking a little at 121-6. The England spinner was trapped lbw by the returning Weighill. Tattersall and Mattew Waite steadied the ship and took the score to 178-7 at the 40 over mark.
The pair steered their side through the 200 barrier in the 44th over before Billy Root took a catch on the boundary to remove Waite for 44 off Cooke and end a partnership that yielded 84 runs for the eighth wicket.
Tattersall’s 50 came up off 58 balls and contained two boundaries. He succumbed to a catch by home skipper Kiran Carlson off the bowling of Hogan in the 47th over for 53.
The Vikings closed their innings on 230 when Josh Sullivan holed out to Hogan off the bowling of Weighill eight ball short of their full allocation of 50 overs. There were 25 extras.
Hill ended as the best bowler for the Vikings, taking 3-49 in his 10 overs.