Bradford worked tirelessly to keep up the early pressure on their opponents and deserved to go ahead when Donaldson drove over the line from Mitch Souter’s neat pass.
Moments later, a clever steal of the ball by James Meadows led to a delicate pass by Joe Keyes, which Gee showed hunger to dive onto and score.
Castleford’s defence continued to look ragged and uncomfortable as they repeatedly gave away penalties in Danny McGuire’s first competitive match as head coach, with Meadows opting to strike between the posts for an extra two points.
An opportunistic drop-goal from Keyes kept the scoreboard ticking over, before Holmes collected a loose ball and accelerated away brilliantly, just as the visitors had committed high up the pitch.
Cas lacked cutting edge, but finally scored in the second half when Jeremiah Simbiken touched over from Daejarn Asi’s delicate toe-poked kick.
Three minutes later, Josh Simm reignited Castleford’s belief after capitalising on a loose offload by Bradford, with Hoy converting to reduce the deficit to 17-12.
Just as Bradford tried to wind down the clock, Jordan Lilley eased the home side’s nerves by adding another drop-goal.
But Hoy sent shockwaves around Odsal Stadium when he showed great pace and trickery to spook the Bulls backline and put his side within reach of extra time.
Hoy, who looked hurt as he touched the ball down, then got up to take the all-important kick, but he fell to his knees in agony as it sunk narrowly wide of the posts.