"It Was Always You" was written by Maroon 5's lead singer Adam Levine, Sam Martin, Jason Evigan, Marcus Lomax, Jordan Johnson and Stefan Johnson. It was produced by Jason Evigan and The Monsters and the Strangerz. The upbeat ballad, lyrically about friends becoming lovers, features Levine singing such lyrics as: "Woke up sweating from a dream / With a different kind of feeling", "Hazel eyes, I was so color blind", "It was always you / Can't believe I could not see it all this time, all this time", "Now I know why my heart wasn't satisfied, satisfied" and "All my hidden desires finally came alive" in his signature falsetto, belted over synthesizers. E! Online's Chima Simone noted that these lyrics might refer to Levine's wife Behati Prinsloo. "Sometimes what you’re looking for is right in front of you," MTV News' Christina Garibaldi noted as the song's central message. Levine is joined on the song by fellow Maroon 5 members: keyboardist and rhythm guitarist Jesse Carmichael (who did not perform on the band's 2012 album Overexposed), drummer Matt Flynn, bassist Mickey Madden, keyboardist PJ Morton and guitarist James Valentine.
In a departure from the band's usual pop rock songs and their previous pop-leaning single "Maps", "It Was Always You" incorporates electronic synthesizers (opening with "jittery synths", according to Idolator's Mike Wass) and is an electropop song. Its sound has been compared to 1980s music. While noted as a different musical style for the band, Wass described it as "unmistakably Maroon 5".