Often (but by no means always!) the first note of the song gives away the key. When that is not the case you just have to listen to the chords to discover when and where the organ or piano or guitar is playing a major or a minor or a diminished chord. Gospel is so jazz influenced that it can be difficult to determine a key because bassists and pianoists play so many non-chord tones.