John Lennon was sued in 1969 by the publisher of the 1956 Chuck Berry song "You Can't Catch Me" claiming that he infringed on that copyright when writing his Beatles song "Come Together" in 1969. Lennon settled out of court.
The songs share a similar blues melody and structure, although the Chuck Berry-written song has a more upbeat tempo. And Lennon even used a line directly from Berry's song, which was about driving a fast car, "Here come a flat-top / He was movin' up with me," changing it only slightly and opening his song with, "Here come ol' flat-top / He come groovin' up slowly."
Here is The Beatles' "Come Together."
And here is Chuck Berry's "You Can't Catch Me."
A significant difference between the two songs can be attributed to Paul McCartney's bassline for the song. In October, 2022, on the podcast "Fly on the Wall with Dana Carvey and David Spade," McCartney told the story of Lennon initially bringing the song to him.
"He came in, and he basically brought in a Chuck Berry song. Chuck Berry did a song called, "You Can't Catch Me," which starts off, 'Here come old flattop, He go…' It's the exact opening line.
"So, John brings it in, we are in Abbey Road Studio #2, and John comes in there. He goes 'Oh, listen to this one! [singing in upbeat tempo] Boom-chicka-boom-chicka-boom, Here come old flattop!" And I go, 'John! Stop! That's "You Can't Catch Me,"by Chuck Berry.'
"He goes, 'Yeah, I know! It's good though, isn't it?' I said, 'No, you've got to do something with it.'
"So that was the case where we had to get it out of that Chuck Berry tempo. And you know, you couldn't change that opening line, it's such a good opening line. John had to pay Chuck Berry for using that. …
"[I said,] 'No, no, How about we slow it down?' [Sings the bassline.] And suddenly we had this swampy groove, and John… starts singing on top of that."
There were apparently no hard feelings between Lennon and Berry. Here they are playing together, and talking (with Yoko Ono) on The Mike Douglas Show, only three years later, in 1972. It was the first time they ever met, and Lennon said before introducing Berry, "I think he's the greatest. I really love him. It's an honor to be here, backing him."