I am a huge fan of both, so its hard to say which is the best.
The Dead obviously started it all. They were there from the beginning, absolutely crucial in the forming of the many traditions, styles, and attitudes of the musical niche that is now known as jam bands. They released several perfect albums (workingmans, amer. beauty, etc) and a huge wealth of amazing live material.
That being said, I do think that Phish took the musicianship and improvisation to the next level. Pre-hiatus, Phish were the tightest live band on the planet. Their ability to go into full band improvisation (not just soloing over a chord progression) and effortlessly transition between a multitude of musical styles has never been touched by any other band. Where the Dead played glorious mellow exploratory psychedelic music that seemed to just thump along into eternity, Phish played high-energy acrobatic musical mayhem, complete with insane tempo changes, searing peaks, and funky bass. Also, Trey's guitar tone is the tops.
They were both amazing bands who completely changed the face of music as we know it. The Dead started the sound, or started searching for the sound, then Phish took over and set the bar incredibly fucking high for all else who come. The music of Phish is more musically challenging than the Dead, by far, but that doesn't mean they're a better band. Its all about who took you there. I'm happy to say they both did for me.