Although Black Sabbath is the first band to actually be considered the first real band of the "Heavy Metal" genre of music, there are other influences on both them and the genre in general:
The Beatles recording of Helter Skelter (1968)
Steppenwolf wrote the lyric "Heavy Metal Thunder"
Iron Butterfly - But they were more Acid Rock/Psychadelic than Metal
Led Zeppelin - Although they started out as the breakup of the Yardbirds (Jimmy Page owned the name), they were a blues band but heavier. The fact that they may have been considered a metal band came later.
But according to critics first heavy metal band is Blue Cheer with song Summertime Blues.