They found themselves 7-6 down after 20 minutes as Nicky Little's converted try cancelled out two Niall O'Connor penalties.
The game turned on 33 minutes, however, as Grewcock was dismissed for a stamp on Ferris' outstretched arm on the floor of a ruck.
Grewcock will presumably have argued that his other foot should not have been grabbed by Ferris, but that did not wash with French referee Jerome Garces.
O'Connor kicked the resulting penalty and Ulster opened up after half-time as they sensed Bath were there for the taking.
Trimble scored a superb solo try two minutes into the half, taking the ball just outside his own 22 and showing a frightening burst of speed to leave the Bath defence in his wake.
Ulster added a second soon after, Simon Danielli collecting his own chip before breaking clear to feed the supporting Cave for a simple try.
Bath were on the rack but despite being a man down, they showed admirable spirit to keep Ulster at bay.
With the clock ticking down and Stade within four points of Edinburgh, Ulster's chances were fading rapidly although there was a brief glimmer of hope when Wallace jinked and stepped his way over with three minutes left.
A fourth try did not materialise, and even if Ulster had scored another, Stade's losing bonus point in Edinburgh would have sent the Parisians through anyway.
Bath head coach Steve Meehan:
"I wouldn't say we lost the game because Danny was off the field.
"There was a 10-minute spell just after half-time when we weren't applying ourselves to the game and were falling off tackles.
"For whatever reason we started the second half poorly. We were then playing catch-up.
"We're down to 14 men and it's 21-10. We were attempting passes that weren't on, when you'd expect to be a bit more patient, setting up a ruck.
"Our half-dozen matches in the Heineken Cup reflected the five months of our season.
"We played well in patches today almost getting there and then taking a step back. It's been extremely frustrating for all involved, the supporters too."
Ulster head coach Brian McLaughlin: "It's a monkey off our back - we are reflecting on the fact that we have won our first game in England.
"It's a great win from our point of view. "We came out at half-time knowing that if we could turn the screw, with Bath down to 14 men, we had a good chance.
"Bath came back really well and put our defence under ferocious pressure and we couldn't seem to get our hands on the ball."
Bath: Maddock; Stephenson, Carraro, Hape, Banahan; Little, Claassens; Flatman, Mears, Wilson, Grewcock, Hooper, Beattie, Salvi, Watson. Replacements: Cuthbert for Maddock (74), Davis for Little (76), Bemand for Claassens (76), Barnes for Flatman (64), Dixon for Mears (64), Jarvis for Wilson (74), Short for Beattie (50), Fa'amatuainu for Watson (69).
Sent Off: Grewcock (32).
Ulster: Smith; Trimble, Cave, Wallace, Danielli; O'Connor, Boss; Court, Brady, Botha, Tuohy, O'Donoghue, Ferris, Pollock, Henry. Replacements: Willis for Boss (74), Young for Court (74), Kyriacou for Brady (64), D. Fitzpatrick for Botha (64), Caldwell for O'Donoghue (66), Anderson for Ferris (74). Not Used: Humphreys, Nagusa.
Bookmark with:
What are these?