There should not be any metallurgical concerns with a new stainless steel homebrew keg (i.e. no need to re-passivate prior to use). You should, however, always clean a new or used keg prior to use - new kegs may have particulate or oils left over from the manufacturing process, and used kegs may still have soda residue in them. PBW works great for this purpose.
If the metallic taste developed only after being in the keg and carbonated it could have come from the keg, but I would have guessed that a keg which was dirty enough to ruin 5 gallons of beer had to have been noticeably dirty - as in you would have noticed the foul odor and cleaned it before you put beer in it. For that reason I tend to think it was not the keg itself.
Is it possible that the beer was overcarbonated? Excess carbonic acid can be perceived as metallic tasting. Sounds like it's too late now, but in the future this can be fixed by taking the beer off the gas and venting the keg regularly until the carbonation bleeds off to a lower level.
Maybe this metallic flavor was present in secondary, but not noticeable in an uncarbonated sample (carbonation might heighten the perception of the off-flavor). This could be the case if the off-flavor is from chlorophenols. I would describe chlorophenols as a medicinal flavor, rather than metallic, but I have heard other people describe it as metallic. Chlorophenols are produced during fermentation if your source water has chlorine or chloramines in it. To avoid it in the future you'd need to either carbon filter your water or treat your water with campden tablets prior to brewing.
It's a sad day when you have to dump a batch. Hopefully you can get to the bottom of the issue before it's time to keg the next one.