Bradford had lost their previous eight away League games, but second-half strikes from Claus Jorgensen and Gray - with his 11th goal of the season - earned Bradford their smash and grab success.
Wolves, who were briefly on level terms through a strike from George Ndah, only had themselves to blame for the defeat as they squandered a host of chances.
They have now taken just five points from their last six games and the players were booed from the pitch after a third defeat in four matches.
Wolves should have romped into a comfortable advantage before half time as they completely dominated affairs in the opening period.
But, for all their pressure, they did not really test the Bradford goalkeeper Aidan Davison.
Wolves winger Ndah failed to connect with a cross from Mark Kennedy at the far post after just four minutes before Carlton Cole sliced wide from a Paul Ince throughball five minutes later.
When Wolves did manage an effort on target, Davison was more than equal to the task, comfortably saving a shot from Ndah in the 13th minute.
Colin Cameron, Ndah and Cole then saw efforts drift wide before striker Dean Sturridge wasted the best opening of the half firing a close-range drive against the bar from ten yards after a centre from Kennedy.
When Sturridge steered another header wide four minutes into the second half, Wolves were running the risk of paying for wasting so many chances.
That proved to be the case after 61 minutes when Bradford stunned Molineux by taking the lead in their first real attack of the game.
Gray lifted a cross into the box and when Andy Tod nodded the centre back across the face of goal, Jorgensen was perfectly placed to turn the ball home at the far post.
Bradford's advantage proved to be short-lived as Ndah fired them back on level terms with a 30-yard piledriver just two minutes later.
But Bradford were in mood to buckle and regained the lead after 59 minutes - again catching out Wolves at the far post.
Simon Francis fed a ball into the path of Jorgensen whose low cross was stabbed home at the far post by Gray.