There are a number of ways to devise what kind of larger work a short excerpt may be from. Let's think of the main Sacred vocal work types:
1)Mass
2)Oratorio/ Passion
3) Anthem/ Motet
To be able to identify the first of these, it is useful to know the names of all the movements. These are; Kyrie, Gloria, Credo, Sanctus, Benedictus and Angnus Dei. If you hear any of these words, it is a strong clue that this work may be a Mass!
Identifying a Oratorio can be a little more difficult, as they often can sound similar to operas, as they are build up of the same forms: arias, recitatives and choruses. Again, listening to the words can be helpful: many oratorios are in English. Listen out for passages that may sound like Bible verses, or religious stories, as this is a big clue that the work you are listening to is an oratorio. The 18th century was a very popular time for oratorios, so listen out for period instruments, or general late baroque/ early classical styles. Passions are a little different, as they tend to focus entirely on the story of the crucifixion (the passion) of Christ. The most famous Passions are written by Bach and are in German: have a listen to some excerpts on these (especially the chorales!) to understand the sound world of a passion.
The last of these is probably the most difficult to recognise as it can be the most variable. Anthems are most likely to be in English, while motets are more likely to be in Latin (or French, if it's a very early one). Anthems tend not to tell stories as such, but are more likely to express a religious sentiment, so again listen out for the words. They generally are sung by choirs, although some may have solo passages. Motets are generally unaccompanied, and often have more counterpoint than anthems.
Try to access a score of examples of these works, and listen while looking at them, and try recognising their own telling points Good luck!