I think you’re referring to 'The Good, The Bad and The Ugly.' The showdown between the three at the cemetery is what you're describing I think. If it's the music you remember, it's likely to be from this since it's one of the most famous soundtracks ever.