What many are forgetting (except @ubersiren, who only mentioned it), is that taste also takes into account the sense of smell. Smell is very important in taste, and has a much, much larger variability. Don’t you remember having to eat something you didn’t like as a kid, and someone told you to hold your nose? This doesn’t work great, as vapors still travel up your uvula to your nose, but if you’re able to close that (i can, not sure how common that is), you can seriously effect the flavor of what your eating, and it does actually reduce to just the four flavors, which tend to be easier to deal with then all the smells. Have to be careful with that, though, because if you open your uvula too soon, vapors in your mouth will travel up and make you taste it anyway >.<.
So, as far as mechanics, @marinelife had it good, but when it comes to variations in taste, most of that is due to the much larger variability of smell.
another side note. Have you ever smelled something, and said “that tastes great!” by accident? I think this may be a part of how closely linked the two senses are, but that’s probably just anecdotal