Okay, let's say that there's a virus that can infect multiple species, is very hard to cure, extremely contagious, can linger asymptomatically for long periods of time, and likely to be deadly. It somehow runs loose on Earth, and is able to kill every living thing on the planet by infecting lifeforms and disrupting food chains. What is the minimum number of species that it will need to infect to cause a global extinction event?
It just needs to affect human thought patterns to drive them into an ecocidal rage... it probably wouldn't be very hard, looking at the current state of things. Think of it as The Screwfly Solution writ large. Humans are clever enough engineer suitable ways to get rid of everything else, thus avoiding the issues that mu and L.Dutch have raised.
Keeping humans surviving long enough to destroy pretty much everything without wiping themselves out first will be left as an exercise for the reader.
There are estimated around ~8.7 million species of living organisms in world, of which only 1.2 million have yet been detected. This figure of course doesn't include all the bacterial and other microscopic life in the world.
Destroying life usually requires altering one of the physical parameters core to survival of the species on earth, such that that the rate of evolution and resource availability can not keep up with rate of alteration. Just killing intermediate species in a food web may not be enough, rarely do a species feed exclusively one particular species in nature.
So, your virus would have to somehow find a means to do this at scale for all life forms:
increase or decrease the average temperature of earth multifold, so that neither land, nor air, nor water support life forms. The catch is many bacterias and lower organism have been found in completely inhospitable terrains, such as near under water volcainc areas, deep sea trenches etc. Eliminating food chains and food webs becomes harder in the fringe areas.
Poison the water resources enough so that most life doesn't survive. This again will leave pockets of water free of infection, so still may not kill all life.
Alter the proportion of lethal gases in atmosphere. This again may not be enough to kill water species and anaerobic bacteria.
You can think on similar lines and extend it.
I am not sure if destroying all life (i.e. including the bacterial ones) is possible through biological means alone, as there are fundamental limitations on propagation of the infection. However, eliminating large visible species is easier to achieve naturally through the above changes to physical environment. Another aspect to remember is how much time you want to achieve this in.
Rather than focusing on 1 virus alone, you can use the permafrost thawing paradigm where viruses of long past (millions of years ago) frozen in permafrost start infecting different types of host bodies. This has more practicality as one needs to remember that virus are dormant outside of a host body, and the study of viruses so far has largely focused on human virus strains and mammalian virus strains (as they are a greater threat to humanity than say a plant virus due to easier transmissibility), so we do not know what kind of physical alterations a group of viruses can cause through their hosts in long term.
Extinguishing all life on Earth is hardly something a single virus can do. First of all, life is very persistent (we have found active bacterial spores even on space probes left on the Moon). Additionally, a virus spreading is self limitating with the reduction of infectable specimens.
When it comes to the damage it can bring on the ecosystem, it depends on the role of the targeted species in the food chain: for example killing all the apex predators might be less impactful than killing all the pollinating insects.
The apex predators have, below them, some other predators which can increase in size and/or number due to the diminished competition (example foxes and wolves), but if you take out all insect contributing to pollinating the plants you will be left with no new generation of plants but those not relying on them like the anemophiles.
Even worse if you take out the plants regardless of their reproduction mechanism, because you are taking away the foundation of the whole food chain.
As has been mentioned before, killing all life on earth is probably impossible, short of actually destroying the planet, but even that probably wouldn't do it. However, if you want something that will kill off an incredibly large portion of all life on earth, how about this:
A virus that infects the chloroplasts of plants, regardless of the species of plant.
So first up, it'll need some help along the way. There are millions of different species of plants, each with different cell wall structures, not to mention physical structure. The virus would have to originate in one form of plant, and then mutate to be able to get the rest.
You may ask, what is a chloroplast? Much like the mitochondria, the chloroplast is an organelle that was once an independant species and was then absorbed into another, where it degenerated until it became simply an organelle. It is perhaps the most important element of plants, because that is where photosynthesis occurs, allowing plants to absorb sunllight and convert into energy that is useable by the plant and anything that eats it. It still has its own DNA, which replicates, can mutate and, in theory, be infected by a virus. Not all plants have the same chloroplastic genome, but it is very similar, seeing as the integration happened very early in plant evolution.
What could the virus do to the chloroplasts to kill the host? If it induced proliferation of the chloroplast, this would maximise energy production of the plant before dying due to saturation of photosynthesis byproducts. The virus could hijack that energy production to replicate itself, then spread on to its next victims. If you want to add in some human meddling, perhaps scientists discovered the virus' ability to induce chloroplast profileration and tried to use it, but something went wrong. This could help explain some of the less likely biological phenomenom that are necessary for such a virus to develop to a world killer.
Why would this be so devastating to life on earth? Just about all energy that living beings use originates from photosynthesis. If this supervirus wiped out all plant life, herbivores would be soon to follow, and then carnivores. The composters (fungi, mainly) would survive longer, but they would probably die out at some point too if their main source of food got destroyed in a few years. A lot of bacteria and other microbes would survive, but you could probably work in that cyanobacteria also get wiped out by the virus in its final phase. If you wanted to go even further, maybe humanity waged some terrible wars fighting over the last shreds of ressources, or maybe crazy experiments attempting to engineer new sources of food led to all new levels of atmospheric and water pollution. These would still not kill off everything, but you'd get even closer.
There's only one path to accomplish this, and the answer is technically zero.
While I feel this isn't the answer you're looking for, it's the only way to accomplish your objective, but the answer is technically zero species. And since zero is the minimum of all counting numbers, it's the correct answer.
You need something to destroy the entire planet including life dozens of km down under rock, life at the bottom of the ocean, life under or frozen in ice, and most importantly: every tiny microbe surviving deep in our satellites or space junk (as they might re-enter the atmosphere, survive, and reseed life). No other answer given so far will accomplish this.
Even blowing up the entire planet death-star-style is unlikely to accomplish this, as some extremophiles may survive on chunks, or chunks of former Earth in its orbital path will reform into a much smaller Earth, to be reseeded by improperly sterilised space junk. You need to take out the entire orbital ring Earth occupied.
All life will finally be destroyed on Earth, regardless of what the virus does, in about 5 billion years when the sun expands and engulfs all of earths mass. That's it. You just need a very patient virus, not an effective one.