The passion is a setting of chapters 26 and 27 of Matthew's Gospel, concerning the suffering and death of Jesus. I found this excellent summary of the piece: http://www.bach-cantatas.com/Articles/SMP%5BRifkin%5D.htm That author, Joshua Rifkin, indicates that Bach was becoming discouraged with his work at St. Thomas Church in Leipzig, wrote far fewer cantatas than before, and perhaps hoped to find a new position somewhere. "Yet at this very time ... Bach wrote his St. Matthew Passion, the longest and most elaborate work that he ever composed. It would appear that he saw significant phase of his life drawing to a close and took the occasion to produce a work that would synthesise and surpass all that he had previously done in the realm of liturgical music. The St. Matthew Passion was his last major composition for the Leipzig congregation... The first performance of the St. Matthew Passion, given at the Thomaskirche, probably fell on April 11, 1727... "
The Wikipedia site provides an outline of the chorales and arias. There are so many moving moments. Here is a wonderful recording of the entire piece, conducted by Philipp Herreweghe: https://www.youtube.com/watch?v=jm1os4VzTgA