The short answer:
This is based on some old blues songs that influenced the band. Some of the lyrics are from blues singer Albert King's song "The Hunter,"(https://www.youtube.com/watch?v=bHxsjJ3BdLQ) and much of the song was derived from Howlin' Wolf's "How Many More Years." (https://www.youtube.com/watch?v=OpKB6OZ_B4c)
Extended answer:
Some other Led Zeppelin reworkings of blues songs include "You Shook
Me" and "The Lemon Song."
The writing credit on this song went to Jimmy Page, John Paul Jones
and John Bonham - everyone in the band except Robert Plant, who didn't
get a writing credit for any songs on the Led Zeppelin album, although
he did help put this one together. The arrangement of old blues songs
was something he'd done with his former band, Hobbstweedle. >>
This was the last song on the first Led Zeppelin album. It was listed
as 3:30 on the album, but the correct length is 8:28. The reason that
the song was listed as only being a little over 3 minutes was to
promote radio play. Jimmy Page knew that radio would never play a song
over 8 minutes long, so he wrote the track time as shorter on the
album to trick radio stations into playing it.
Led Zeppelin used this to close many of their early concerts. During
the instrumental section, Plant would often thank the audience and
showcase the other band members.
Robert Plant contributed the line, "I got another child on the way,
that makes eleven." It referred to his unborn child, Carmen, who was
born a month or two after Zeppelin recorded this album. >>
This is one of three songs where Jimmy Page played his guitar with a
violin bow. The others are "Dazed And Confused" and "In The Light."
Jimmy's bowing can be heard in the section after his double-tracked
guitar solo ("I was a young man, I couldn't resist...").
Talking about this song in the BBC book The Guitar Greats, Jimmy Page
said: "We had numbers from the Yardbirds that we called free form,
like 'Smokestack Lightnin',' where I'd come up with my own riffs and
things, and obviously I wasn't going to throw all that away, as they
hadn't been recorded, so I remodelled those riffs and used them again,
so the bowing on 'How Many More Times' and 'Good Times, Bad Times' was
an extension of what I'd been working on with the Yardbirds, although
I'd never had that much chance to go to town with it, and to see how
far one could stretch the bowing technique on record, and obviously
for anyone who saw the band, it became quite a little showpiece in
itself."
At the end of the song, the sound pans between the left and right
channels.