Good monitoring. The ns10 rule for that bassguitar/guitar relation. Crystal clear highbass-mids. Easy as cake to make them compliment each other.
^^yep, so either good monitors+room, or good cans.
For faster metal stuff, the key is to use distortion to a certain degree, as already said.
What also really helps is a bass guitar setup with rather low action (and neck as flat as possible), with lighter stainless steel strings (since they are really bright), and picked or fingerpicked over the neck pickup, 'cause that way you'll get some good clankage out of it (i.e. the sound of strings bouncing off the fretboard) , and that is what really helps bass' audibility/its perceived volume and its relationship with the guitar in a dense metal mix.
What is also good about this setup when comparing to a bass guitar set up with higher action and heavier strings, picked over bridge pickup (where tension is higher), is that this way notes die down faster which is what you want when mixing faster stuff, since in this case the bass is more about attack, and less about sustain.
It should be said that this is exactly what you don't want when mixing some slower music (imo of course), where you want the exact opposite - fuller sounding bass, with more sustain and no clankage (because it really adds a lot of aggressiveness, which doesn't sound 'right' most of the time for some slower stuff). As always ymmv.