Although the two words are often used as synonyms, they do not mean the same thing.
Rabies is a disease of dogs that can be transmitted to humans and other animals by biting. It occurs in two main forms:
furious rabies – unprovoked aggressive behavior progresses to muscle spasms, paralysis, coma, and death
dumb rabies -no aggressive behavior in the animal
The word hydrophobia derives from Greek hydrophobos, “dreading water” (hydros, “water” and phobos, “dread, fear.”) An animal or person who dreads water, or who gags when trying to swallow water, is afflicted with hydrophobia.
Hydrophobia is a common symptom of furious rabies.
Strictly speaking, an affected animal has rabies, and may suffer from hydrophobia. The word hydrophobia itself can be applied in other contexts to indicate a fear or dread of water.