This is quite complicated. We still see a mosaic of languages in Europe today, after centuries of nationalism, suppression of minority languages, ample migrations and quite a bit of warfare.
As such, we also have to take into account not only how many speakers of any given language there were. It is less useful to speak a language X that has 150% more speakers compared to an alternative Y if all speakers of X are confined in one small but densely populated area, while Y speakers settled on 500% more swathes of land?
For the situation in 1900 the Russian Empire had 87,162,000 inhabitants counted as 'Russians' in 'Russia proper'.
But Germany had 56,367,178 inhabitants that were all forced to learn some form of High German. Although some would natively speak Danish, Polish, some French or Sorbish.
Austria-Hungary had a population of 47,295,100 with quite some native German speakers and lots of people being forced to be able to communicate in German and Hungarian.
France with its 38,900,000 people would provide a lot of native speakers on its soil, but also lend its language as lingua franca to diplomatic circles.
As such, English would be well understood by enough people a traveler would meet in French harbours, in Bremen, Hamburg, Copenhagen etc. but it had only 39,875,900 inhabitants and therefore native speakers on the islands.
But the problems do not stop there.
The German Sprachraum actually includes parts of then Netherlands, Switzerland:

and Bohemia, Hungary, Poland (within Russian Empire). These were settlement patterns with mostly a majority of German native speakers. If you go for cities, especially trade cities, and mostly those who were old Hanse trading posts, then the number of places were you were bound to found someone who could understand German would increase further. Prague for example had a sizeable German speaking population. One that incidentally was widely regarded as speaking the "best and cleanest German" around, better than in Germany proper. Might have some reason in Prague being the oldest German university.
In all places with intermixed settlement patterns, a certain level of multilingualism of the inhabitants could be expected reasonably.
Also take note that at that point German was the lingua franca for science.
But while 'German' was very widespread geographically and in numbers of speakers, this was in fact quite sharply divided between North and South in terms of dialect. A Bavarian only used to local dialect would have had a hard time understanding a Northern German equally only used to his local dialect. Curiously a Frisian Dutch would have had less trouble communicating with Germans along the shores as the low German dialect of lower Saxon and Dutch Nedersaksisch are linguistically more 'the same language' than low-German and Hochdeutsch (standard German). Much as North and South Italy are linguistically much less uniform Italian as we a re led to believe by modern maps.

Given these complications, I would conclude there is no 'the most useful language' for the whole of Europe in 1900. But I would also argue that for the area of land potentially covered and for the raw number of native speakers, plus the number of assumed second language speakers, German comes out as pretty useful in Central and Eastern Europe.
In fact, Wikipedia lists most of the candidates on a European lingua franca with:
English
English is the current lingua franca of international business, education, science, technology, diplomacy, entertainment, radio, seafaring, and aviation. After World War II, it has gradually replaced French as the lingua franca of international diplomacy.[27] The rise of English in diplomacy began in 1919…,
French
French was the language of diplomacy from the 17th century until the mid-20th century,…
German
German served as a lingua franca in large portions of Europe for centuries, mainly the Holy Roman Empire outside of the sphere of influence of the Hanseatic League, which used Low German. Over time, the political expansion of German-speaking powers and the influence of German-language culture caused High German to eclipse other forms of German as well as to become a lingua franca in large parts of Slavic-, Baltic- and Hungarian-speaking Europe.
German remained an important second language in much of Central and Eastern Europe after the dissolution of the Austro-Hungarian Empire in 1918. Today, although to a much diminished degree after World War II, it is still the most common second language in some of the countries which were formerly part of the empire, such as Slovenia (45% of the population), Croatia (34%),[31] the Czech Republic (31%) and Slovakia (28%). In others, it is also known by significant numbers of the population (in Poland by 18%, in Hungary by 16%).
In the late 19th and early 20th centuries, German was a prerequisite language for scientists. Despite the anti-German sentiment after World War I and World War II, it remains a widespread language among scholars and academics.
Greek and Latin
Italian
The Mediterranean Lingua Franca was largely based on Italian and Provençal. This language was spoken from the 11th to 19th centuries around the Mediterranean basin, particularly in the European commercial empires of Italian cities (Genoa, Venice, Florence, Milan, Pisa, Siena) and in trading ports located throughout the eastern Mediterranean rim.
During the Renaissance, standard Italian was spoken as a language of culture in the main royal courts of Europe, and among intellectuals. This lasted from the 14th century to the end of the 16th, when French replaced Italian as the usual lingua franca in northern Europe.[citation needed] On the other hand, Italian musical terms, in particular dynamic and tempo notations, have continued in use to the present day, especially for classical music, in music revues and program notes as well as in printed scores. Italian is considered the language of Opera.
Low German
From about 1200 to 1600, Middle Low German was the language of the Hanseatic League which was present in most Northern European seaports, even London.[citation needed] It resulted in numerous Low German words being borrowed into Danish, Norwegian and Swedish. After the Middle Ages, modern High German and Dutch began to displace Low German, and it has now been reduced to many regional dialects, although they are still largely mutually intelligible.
Polish
Polish was a lingua franca in areas of Central and Eastern Europe, especially regions that belonged to the Polish-Lithuanian Commonwealth. Polish was for several centuries the main language spoken by the ruling classes in Lithuania and Ukraine, and the modern state of Belarus.[35] After the Partitions of Poland and the incorporation of most of the Polish areas into the Russian Empire as Congress Poland, the Russian language almost completely supplanted Polish.
Russian
Russian is in use and widely understood in Central Asia and the Caucasus, areas formerly part of the Soviet Union or bloc, and in much of Central and Eastern Europe, formerly part of the Warsaw Pact. It remains the official language of the Commonwealth of Independent States. Russian is also one of the six official languages of the United Nations.
Serbo-Croatian
Serbo-Croatian is a lingua franca in several of the territories of the former Yugoslavia, that is, modern Bosnia and Herzegovina, Croatia, Montenegro and Serbia. In those four countries it is the main native language, and is also spoken by ethnic minorities. For example, a Hungarian from Vojvodina and an Italian from Istria might use it as a shared second language. Most people in Slovenia and Macedonia can understand or speak Serbo-Croatian as well. It is a pluricentric language and is commonly referred to as Bosnian, Croatian, Serbian or Montenegrin depending on the background of the speaker.
Yiddish
Yiddish originated in the Ashkenazi culture that developed from about the 10th century in the Rhineland and then spread to central and eastern Europe and eventually to other continents. For a significant portion of its history, Yiddish was the primary spoken language of the Ashkenazi Jews. Eastern Yiddish, three dialects of which are still spoken today, includes a significant but varying percentage of words from Slavic, Romanian and other local languages.
Taken together, if forced to pick one winner: German had at least double the number of native speakers compared to French, and way more second language German speakers than French. The area covered with first or second language German speakers is approximately four times the size compared with French and adding to that the dispersed language islands extending quite far East the distance grows even further.
Due to the 'specified scenario in question', the second place French isn't that far away as the just re-iterated numbers would suggest. Prestige and diplomatic language of educated people compensates much of them.
But that also brings in English again. While most of the crowned heads in that time head a German component in their families, Queen Victoria also supplied a lot of spouses, heirs etc. Coupled with industrial connections and empire related colonial trade, the measly island number of native speakers will lead to underestimating its influence in metropolitan trading centres and courts.