 The song was produced by Trainor and Chris Gelbuda, who she had first met in 2011 at a music conference in Colorado.They later co-wrote Sabrina Carpenter's "Can't Blame a Girl for Trying".During their recording of the track "3am" for "Title", Trainor told Gelbuda about "Like I'm Gonna Lose You", a reggae song which she felt was a poor fit for the album.