"It Had to Be You" was written in 1924. It was featured in the 1944 musical film Show Business. The music is by Isham Jones and the lyrics are by Gus Kahn.
"It Had to Be You" was first recorded by the duet of Billy Murray and Aileen Stanley in 1924.
Danny Thomas performed the song in the 1951 film I'll See You in My Dreams in which Thomas portrayed songwriter Gus Kahn.
Since then it's been recorded by a variety of performers including Ray Charles, Rod Stewart, John Travolta, Harry Connick Jr., Kenny Rogers, and Harry Nilsson.