If a song lacks the triplet gallop rhythm the song is not heavy metal.
If heavy metal is going to be an actual musical category rather than a marketing gimmick, there must be some way to distinguish its musical features. It must be more than mere imagery about the dark side of skeletons and goblins.
Giving a thorough listen through of Black Sabbath between 1970 and 1974, you will be hard-pressed to find a song with the gallop rhythm. In spite of what many believe, Black Sabbath were more of an acid rock and blues rock jam band.
It fails to matter what lyrics Ozzy Osbourne sang or if the band had devil imagery. To be sure, you can hear inspiration in Sabbath songs Electric Funeral, Sweat Leaf, Snow Blind, A National Acrobat, and Sabbra Cadabra for a band decades later, Soundgarden. Yet, that fails to make Black Sabbath a metal band.
I suppose an argument could be made for Children of the Grave (1971, Master of Reality) as coming close to the triplet gallop rhythm. In the same year, Pink Floyd released Meddle, which featured a track, One of the Days, which certainly has something approaching a triplet gallop rhythm on bass.
The band that made a staple of the triplet gallop rhythm, Judas Priest, released their first LP in 1974 titled Rocka Rolla. The title track hints at the gallop, but does not quite capture it as they did later with the song Exciter (1978, Stained Class).
Sure, some claim that Hard Lovin' Man (1970, Deep Purple in Rock) and Highway Star (1972, Machine Head) by Deep Purple were the first metal songs with a gallop rhythm, but not really. Of the two, Highway Star is closest. The rhythmic sound is played by Jon Lord on the organ and it is more pulsing rather than galloping. To his credit, Ian Gillian did have the first heavy metal scream voice later copied by Rob Halford of Judas Priest.
In 1974, Sweet, later known for pop songs Little Willy (1971, Funny How Sweet Co-Co Can Be), Fox On the Run (1974, Desolation Boulevard), Ballroom Blitz (1974, Desolation Boulevard) and Love is Like Oxygen (1978, Level Headed), none of which are metal, released an LP titled Sweet Fanny Adams. On that LP is the song Sweet F.A., likely which is the first true heavy metal song.