According to the almighty Songfacts, Paul McCartney wanted to write the "loudest, nastiest, sweatiest rock number we could" after reading a Pete Townshend interview describing a Who track (possibly "I Can See For Miles") as "The most raucous rock 'n' roll, the dirtiest thing they'd ever done." This was the result.
The song is named after a slide at a British amusement park. The first line is a joke about this: "When I get to the bottom I go back to the top of the slide, where I stop and I turn and I go for a ride."
For the album version, recorded September 9, 1968, 21 takes of approximately 5 minutes each were recorded, and the last one is featured on the official LP. Poor Ringo's hands hurt so badly from all the drumming, he famously yelled out at the end of the last take, "I've got blisters on my fingers!"
I love all versions of Beatles - from happy, poppy Beatles to psychedelic sitar Beatles, but nothing gets me going more than the dirty lowdown Beatles that growled and riffed through Helter Skelter.