I think the Beatles included three inherently gifted songwriters by sheer coincidence. No doubt the apprenticeship helped, but Harrison was writing songs like Taxman and experimenting with Indian classical music on Love You Too in 1966.
It's not either/or, it's both. They were gifted, but they also had the time, money and motivation to work on their skills and hone their craft. It's not by coincidence that in literally every community that talks about how to level up their skills, the first response is always "practice practice practice".
By 1966 George Harrison had been in a group (with various names) with Lennon and McCartney for 8 years, their songwriting partnership had been actively writing songs for 5 or 6 years, they had written almost all the songs for 6 or 7 albums, several of which are regarded as among the best albums of all time.