Gray's contract at Elland Road has been terminated, which is subject to Football Association and Football League ratification, and he will pen an 18-month deal with Phil Parkinson's side.
The 35 year-old signed for the Bantams in 2002 and has also featured for Yorkshire rivals Barnsley and Sheffield United.
The former Scotland international should be eligible to play against Oxford on Saturday and Parkinson says he is pleased with his new recruit.
"I'm delighted to have brought Andy into the football club," he told Bradford's official website.
"We've tried to sign him before in the summer, and we're really pleased we have him here now.
"It will be good for the lads to see a fresh face around the training ground. Andy will bring a lot to the squad and help support the current strikers we have here already.
"James (Hanson), Nahki (Wells) and Alan (Connell) have been doing most of the work up top for us this season, and we just felt that we needed some extra up there to help them out.
"Andy's attributes as a striker ensures he will bring a lot to the table and I'm sure he'll make a great addition."
- Sports & Recreation