Racan, 63, who headed Croatia's first staunchly pro-Western government from 2000 to 2003 and afterward led the country's strongest political opposition, was diagnosed with a malignant tumor in his shoulder two months ago.
Doctors said the cancer had spread from his kidney and recently reached his brain.
Tonino Picula, who served as foreign minister in Racan's government, said Friday that it appeared his colleague would not recover and that doctors could only focus on alleviating his pain.
"It is a highly aggressive form of cancer that has rapidly spread throughout his body and destroyed his immune system," Picula told state radio Friday. "All the doctors can do now is soften the pain."
Racan, who resigned as the head of the Social Democratic Party on Wednesday saying he was stepping down "to continue the battle for my life," was apparently falling in and out of consciousness throughout the night.
President Stipe Mesic visited Racan in the hospital Thursday and said his condition was "serious."
Mesic said that Racan had "regained consciousness" when he arrived to visit, they exchanged a few sentences, and "then he gave me a handshake and again fell into unconsciousness."
Prime Minister Ivo Sanader also visited Racan's bedside to wish him recovery, but conceded that there appeared little hope of a turnaround.
Racan's illness comes as a blow to the Social Democrats. The center-left party is ranked just behind the governing Croatian Democratic Union in the polls and was hoping to win November parliamentary elections.
"His departure will be a severe handicap," said Zeljka Antunovic, the party's caretaker president. She said she would try to ensure that the Social Democrats continue Racan's legacy.
As prime minister, Racan led Croatia's first pro-Western government after the authoritarian and nationalist rule of late President Franjo Tudjman.
He became a symbol of his party, and no other member has reached his popularity. The party was expected next week to decide when it would elect a new leader.
Racan was born in 1944 in a Nazi labor camp in Ebersbach, Germany. In the communist-run former Yugoslavia, he was a Communist, but later transformed his party into a pro-Western, center-left group.