Sportal.co.nz 13.Jan.2014Getty Images
Gopperth scored 21 points, including two first-half tries, in Leinster's comeback win. Leinster need only one point from their last game, at home, to the Ospreys on Friday to qualify for the quarter-finals as pool winners. Leinster are four points clear of Northampton.
Castres hadn't been beaten at home since January 2013 and they led the match 14-0 after the first quarter.
While struggling to contain the French side's scrum, Leinster's defence proved effective in nullifying their threat in the latter stages of the game.
Former All Blacks and Chiefs forward Jono Gibbes, who is the Leinster forwards coach, said: "Castres delivered everything we thought they would – they were massively combative, very physical at the breakdown and a good setpiece.
"It took a massive effort from us to score three tries and we almost sniffed out an opportunity for a fourth at the end.
"To come to a place like this against a well-organised team that haven't given up a lot of tries at home, it's a satisfying result and puts a spring in our step for next week," he said.
Gibbes said the good start by Castres was down to Leincester's deficiencies rather than them created their own opportunities.
"But they're a good team, we gave them a little bit and they took those two tries early.
"We just felt if we were able to get a little bit of a foothold with possession, particularly at set-piece, that we may be able to put pressure on them later on...and it took quite a long time to do that.
"I thought the boys' resilience and energy and their commitment to keep getting up and running into these big fellows here was first class," he said.
Gopperth said it was important for Leinster to beat the Ospreys as it would give them a home quarter-final.
"We've just got to make sure we get the points on the board early, make sure we win first and let the game take care of itself after that. Hopefully, we'll get a good outcome from it," he said.
"We were disappointed with missing a couple of first-up tackles that got us into that situation [down 14-0]. It's the belief in each other and wanting to work hard for each other.
"Leinster have always been a great scrambling team and I think we just worked hard for each other because we want to be in the top eight.
"Our set-piece took a bit of a hard knock and they got their act into gear, and we really got some go-forward ball and looked after it in the second half. That's when we created opportunities and we finished well," he said.