Story 
"Happiness Is a Warm Gun" is a song by the English rock band the Beatles from their 1968 album The Beatles. It was written by John Lennon and credited to the Lennon–McCartney partnership. He derived the title from an article in American Rifleman magazine and explained that the lyrics were a double entendre for guns and his sexual desire for Yoko Ono. [Wikipedia]
Happiness Is a Warm Gun is a song by The Beatles, written by Lennon and led on vocal by John Lennon. Title from a gun-magazine ad; three songs in one, six time-signatures. John Lennon's controversial composition combined multiple musical sections into a medley-like structure, featuring references to Charles Whitman's tower shooting tragedy and ironic juxtaposition of war imagery with romantic devotion. The song's famous title drew from a National Rifle Association advertisement, repurposed as surrealist commentary on American gun culture. The track's shifting arrangements and multiple key changes reflected the era's experimental compositional ambitions. Lennon joined disparate fragments in Happiness Is a Warm Gun, a compositional strategy George Martin mediated with diplomatic compromise regarding album-side pacing. (Kozinn 1995, p.203)
The session work falls within the band's The White Album (1968) period, recorded 23 Sep 1968 at EMI Studios + Trident Studios (Soho). George Martin (with Chris Thomas covering) produced; Ken Scott (early), Geoff Emerick walked off — replaced engineered. For session-by-session detail, see Mark Lewisohn's account on p.157 of The Complete Beatles Recording Sessions (excerpt below). Recorded across multiple sessions with extensive overdubbing of vocals, instruments, and sound effects, 'Happiness Is a Warm Gun' exemplified the White Album's complex production demands. George Martin's arrangement incorporated multiple musical sections, requiring precise coordination and careful tape editing. The vocal layering involved manual double-tracking and harmony overdubs, with engineering precision necessary to maintain clarity across the track's structural complexity. Multiple vocal overdubs and harmony layers required manual double-tracking and careful tape alignment during Ken Scott's engineering of the complex multi-section arrangement. (Emerick 2006, p.not cited) Three distinct harmonic regions—E minor's anguish, A Lydian in 3/8 for the doo-wop refrain, A minor's concluding section—embody Lennon's structural fragmentation. (MacDonald 1994, p.135)