This is by Gerry Goffin (apparently he said it was his favourite of the lyrics he wrote) and his wife Carole King.
Here is the demo, which to me outshines any of the official versions. King plays the piano but the singer is Drifters’ lead vocalist Rudy Lewis, not Goffin.
It was recorded in 1962 by the Drifters, who took it to No 5 in America the following year
Kenny Lynch covered it in 1962 and reached No 10 in Britain.