Bath (11) 35
Tries: Beattie, Stephenson 2, Berne Cons: James 3 Pens: James 3
Glasgow (14) 31
Tries: T Evans 3, O'Hare, Jackson Cons: Gregor 2, Jackson
Stephenson scores his first try against Glasgow at the Rec
Bath hung on for a crucial bonus-point Heineken Cup win despite conceding five tries against a spirited Glasgow.
The home side made a host of errors in the first half and Glasgow led 14-11 at the break with two Thom Evans tries.
Michael Stephenson responded for Bath just after half-time only for Evans to claim his third try.
Stephenson and Shane Berne looked to have sealed an easy win but tries from Hefin O'Hare and Ruaridh Jackson set up a grandstand finish.
And Jackson, making his first start at fly-half, almost sneaked an amazing victory with the last play of the game but he ran out of gas after intercepting a Bath attack inside his own 22.
Bath's victory was vital to their Heineken Cup aspirations after Pool Five rivals Toulouse claimed a bonus-point win over the Dragons on Saturday.
And it leaves them three points behind the French giants after three games played, with Toulouse having to travel to the Rec in the final pool encounter.
Glasgow played their part in a thrilling contest, despite coming into the game without any serious hopes of reaching the last eight and without injured first-choice half-backs Dan Parks and Mark McMillan.
The visitors showed positive intent from the start, Evans crossing after just six minutes following some slack Bath defending.
Bath enjoyed plenty of possession but mistakes cost them dear as they neared the Glasgow try-line.
However Butch James landed a 17th-minute penalty while flanker Andy Beattie managed to touch down when Bath's forwards rumbled over from a close-range scrum.
Glasgow hit back with a second score from Evans, who burst a massive hole in the Bath line, although James did reduce the deficit with a penalty at the end of the half.
Bath were fired up after the interval and they regained the lead when Stephenson evaded three tackles to storm over in the corner, while James added a third penalty.
But just when the home side looked to be securing a decisive cushion, Glasgow crossed again - Evans gratefully collecting and touching the ball down after Stephenson failed to deal with a clever kick through from centre Andrew Henderson.
Gregor's conversion and drop-goal came back off the woodwork and Bath took full advantage of the misses, Stephenson powerfully running in from 10m and Berne scoring a minute later following a break from Matt Banahan.
The game was not over though and Bath were forced to endure a nervy last few minutes when O'Hare finished off a counter attack and Jackson crossed after intercepting a speculative Nick Abendanon pass.
And the stage was set for a incredible finale when Jackson intercepted from deep but his attack fizzled out, leaving Bath breathing a sigh of relief.
Bath head coach Steve Meehan:
"I am very disappointed with our defensive application. Defence is a reflection of motivation and attitude, and we need to do some work on that.
"Glasgow are currently second in the Magners League, they have a terrific spirit and great drive, and we have to make sure our attitude is spot-on when we go up there next Sunday.
"At 35-19 ahead, we had the game under control, but it goes until the final bell, which is a question for the players individually and collectively. Holes opened up in our defence because guys were lazy.
"If we are going to go through, then we need to win in Glasgow next weekend. We need to continue nipping at Toulouse's heels."
Glasgow coach Sean Lineen:
"We are very frustrated. The guys had a lot of belief coming down here. They are an exceptional bunch of players, and they want to win.
"Losing against Newport Gwent Dragons in our opening game was the killer for us. We were 10-0 up in that game, then their forwards came back and dominated the contest.
"It would have been fantastic to get a result here, but ultimately we need to tighten our defence and we've got to learn when to play - and when not to play.
"We came up short, but the players are hurting. We deserved to maybe get a bit more."
Bath: Abendanon; Stephenson, Cheeseman, Fuimaono-Sapolu, Banahan; James, Claassens; Flatman, Dixon, Stevens, Hooper, Grewcock, Beattie, Lipman, Browne.
Replacements: Higgins for Stephenson (59), Berne for Cheeseman (41), Bemand for Claassens (67), Mears for Dixon (56), Jarvis for Stevens (72), Harrison for Short (56), Faamatuainu for Browne (56).
Glasgow: Stortoni; Faatau, M Evans, Henderson, T Evans; Jackson, Gregor; Tckachuk, Hall, Kalman, Barker, Kellock, Brown, Barclay, Beattie.
Replacements: O'Hare for T. Evans (67), Pinder for Gregor (60), Milligan for Hall (64), Low for Kalman (41), Turner for Kellock (58), Vernon for Beattie (64).
Not Used: Nunez Piossek.
Referee: Alain Rolland (Ireland)