"We thought we had done enough in this game to come away with a win," he said.
"If we replicate that performance in the next 11 games we will avoid relegation, definitely. We're only going to see better performances from this side. We've left it a bit late but it's about looking forward, not back."
Key was delighted with the performance of flanker Hendre Fourie against England captain Lewis Moody, saying: "He sent out a very positive message to the England selectors about what a dangerous player he is. He contributed massively – he was immense today, unbelievable."
Bath head coach Steve Meehan said: "I'd rather win ugly than lose ugly," after it took Olly Barkley's third penalty to secure victory at the Recreation Ground.
Apart from a moment of brilliance by Nick Abendanon, scoring immediately after half-time, Bath huffed and puffed against spirited opponents who were buoyed by their win over Gloucester the previous week.
Meehan commended the Premiership's bottom club for their efforts, saying: "We've said it before. They are a side that work very, very hard for one another and you've got to take your opportunities.
"We made life difficult for ourselves. Leeds displayed great spirit and character and were very much up for the match.
"We had three very obvious opportunities to clear our lines after defending very well. But we didn't take any of them and we allowed Leeds to come back and put pressure on us and they ended up levelling the scores. Then we had to fight back over those last 15 minutes."
Meehan, whose preparations were disrupted by the 11th-hour withdrawal of captain Luke Watson with a foot injury – he was replaced by Ben Skirving – insisted: "I was really, really pleased with some of the attacking endeavour. Some of the moves were as good as anything in the last few years so we're not far away, that's for sure.
"And our set-piece over the last two weeks has been far, far better. Scrum-time was excellent too so I'm delighted the way the forwards are going.
"The teams just above us will start to take notice – they know we've got a couple of games in hand. We're in a good position, if we can keep sneaking up on people."
Abendanon's try straight after half-time proved crucial.
He latched onto a cleverly-disguised inside pass from fly-half Butch James and outpaced the cover, rolling over to touch down as he was caught on the line. Olly Barkley converted and added three penalties.
Otherwise, however, it was another patchy performance from Bath, who failed to subdue the Leeds pack as easily as they had overcome London Irish on New Year's Day.
It was a frustrating afternoon for the Premiership's bottom side, who had plenty of possession and territory and overcame the loss of scrum-half Warren Fury to the sin-bin in the first half to lead 6-3 at one stage.
After breaking their Premiership duck against Gloucester, Leeds arrived with an unchanged starting line-up, including try-scorer Michael Stephenson and No 8 Daniel Browne, both released by Bath last summer.
Despite talk of Bath 'narrowing' their game to win ugly when necessary, they opened with plenty of pace and width, but could not finish off. Eventually, Barkley kicked a 10th-minute penalty from 40 metres.
Leeds survived the onslaught to string together several phases at the other end, until James was able to relieve the pressure by hacking clear and Scott Barrow knocked on.
The visitors were quickly back on the attack but James opened his box of tricks with a deft chip over their defensive line from within his own 22 and Barkley gathered to gain 60 metres with a rolling kick.
On 25 minutes, Leeds' persistence and Bath infringements earned Ceiron Thomas the chance to level the scores from 30 metres.
Bath nearly scored from the restart as Matt Banahan was brought down inches from the line. Fury was yellow-carded for killing the ball, leaving his team-mates to defend desperately as prop David Barnes was cut down by the posts.
It looked grim for the 14 men of Leeds when half-back partner Lachlan MacKay was forced off with an injury but Bath continued to waste opportunities.
Just before Fury returned from the sin-bin, Barrow put his side ahead with a drop-goal – fair reward for the bottom club's spirit and competitiveness at the breakdown. The lead lasted only six minutes, however, as Barkley landed a penalty on the stroke of half-time.
Within 60 seconds of the resumption, Bath shrugged off the mid-winter blues with Abendanon's classy score.
Leeds could quickly have gone further behind but Bath failed to finish off spectacular breaks from long range, first by Ben Skirving and then by Jack Cuthbert.
Instead they found themselves back on the defensive and a knock-on by Cuthbert allowed Leeds to set up camp in the corner and England hooker Steve Thompson eventually peeled off a maul to score.
Thomas added the conversion to bring the sides level at 13-13. Replacement Alfie To'oala nearly created a second five minutes later but the cover closed in on Luther Burrell. Instead it was Bath who regained the lead through the boot of Barkley on 68 minutes. While Abendanon whirled and wheeled in search of an opening, James and Barkley resorted to a more pragmatic approach, skidding kicks into the corners to keep the opposition pinned in their 22.
Barkley missed a kick late on but Leeds at least claimed a losing bonus to continue closing the gap on Newcastle at the bottom.
Bath: Cuthbert, Banahan, Barkley, Hape, Abendanon, James, Claassens, Barnes (Bell 51), Mears (Dixon 50), Wilson, Hooper, Grewcock (Fernandez-Lobbe 51), Skirving, Moody, Taylor. Unused replacements: Jarvis, Van der Glessen, Cook, Vesty, Biggs.
Leeds: Thomas, Blackett, Fa'afili, S Barrow, Stephenson (Burrell 60), MacKay (Hinton 28), Fury (Mathie 54), Hardy (MacDonald 51), Thompson (Nilsen 74), Swainston (Denman 60), T Denton, Wentzel, Oakley (To'oala 60), Fourie, Browne (Myall 51).
Referee: JP Doyle (RFU).