Speaking fluent German is certainly useful for everyday life, but it's not always necessary if you wish to earn a PhD.
Many structured PhD programmes are taught only in English and often you do not have to write your doctoral thesis in German. Find out in the respective doctoral regulations which languages can be used to write your thesis.
If you are looking for PhD programmes, you can check out this online database. It provides detailed information about the requirements for each programme.
For information and advice on learning German, check out this website.