Paul McCartney arrived at Abbey Road Studios around 5pm and began playing a simple riff on piano and building it into a song. When the others showed up, they helped to complete the basic structure and they decided to record it while it was still fresh. With Ringo on drums, George on bass, Paul on lead guitar and John on tambourine, twenty takes were laid down until they got it right. While the Birthday riff is quite simple, the layout of the song is rather tricky, which probably accounts for the high number of takes. In his in-depth look at the song, Dave Rybaczewski notates the structure as aabcadca, or verse (instrumental)/verse/pre-bridge/bridge/verse (instrumental)/segue/bridge/verse - surprising for a song made up on the spot.
At this point, everyone popped over to Paul's house to watch The Girl Can't Help It. Returning to the studio a few hours later, energized after seeing so many of their rock and roll heroes, they resumed work on the song. The first task was to take the unusual step of transferring take twenty, which had been recorded on four-track tape, to eight-track tape to allow for easier overdubbing.
Paul and John recorded their lead vocal parts, John added a second lead guitar line identical to the one Paul had played (except an octave higher), and Yoko Ono and Patti Harrison sang the word "birthday" multiple times during the bridges. The most interesting overdub, however, was played by Paul on a piano which sounds as if it were an early synthesizer. Dave Rybaczewski's in-depth article on the session compiles no less than five different stories about how that sound was achieved. However they did it, it stands out as being absolutely unique.
By 4am, the song was complete and session producer Chris Thomas, who was sitting in for the vacationing George Martin and who had originally informed the Beatles that The Girl Can't Help It was on the telly that evening, mixed the song for mono. When the double album was being assembled a month or so later, Birthday was chosen to open side three.