Trailing the Titans by four points with four minutes left, the Tigers looked at risk of slipping back into the wooden-spoon race on Sunday afternoon at Leichhardt.
But Taylan May sent Jeral Skelton over for a crucial try, before Doueihi missed the conversion attempt from the sideline to take the lead.
It mattered little though, as a Reagan Campbell-Gillard crusher tackle put the Tigers back on the attack.
And while the joint-venture made a mess of the final two plays, Doueihi was able to position himself 30 metres out and right in front to nail the last-minute shot.
Making matters worse for Gold Coast was a knee injury suffered by Tino Fa'asuamaleaui early in the match, leaving him unable to return.
The result piles more pressure on Titans coach Des Hasler, with Gold Coast now officially out of finals contention and alone in 17th place on the NRL ladder.
For the Tigers, the finals also look unlikely. They would need to go undefeated though the final seven rounds to have any hope of snapping a 14-year drought.
But a fourth straight wooden spoon now at least appears equally unlikely.
Sunday's win kicked the joint-venture into 12th spot and four points clear of the Titans, with a bye still in hand.
This match was anything but pretty, with the Tigers' attack at times appearing disjointed and the two sides combining for no less than 26 errors.
But there was a bright spot for the Tigers, with Taylan May scoring one try in his first NRL game in 14 months and setting up the other two.
Playing his first match since domestic-violence charges against him were dropped, May had the Tigers' first when his brother Terrell gave him space on the left.
He then put the Tigers up 12-4 when he combined with Jarome Luai to send Staines across, before the Titans mounted a late first-half comeback.
Phil Sami and Jaylan De Groot both crossed in quick succession, with the second coming off the back of a nice kick from Jayden Campbell.
As good as the Titans were in that period, they were at times their own worst enemies.
Nowhere was that more evident than in the second half with scores locked at 14-14, when they failed to pack a scrum in time and gifted the Tigers a penalty goal.
An AJ Brimson try with 13 minutes to play looked set to save Gold Coast, and bring them level with five other clubs on 16 points at the bottom of the ladder.
But instead the Tigers' late heroics left the Gold Coast alone in 17th, two points behind the likes of Parramatta and South Sydney with seven rounds left.