Jesus has just challenged them with what the major focus of their labors is really aimed at in their heart of hearts - temporal things or eternal? Just the simple mention of "work" and they are suddenly stirred up to find out what they must "do" to be OK with God.
So often, particularly in the neck of the woods where I live, people seem to have a check list of what will get them into heaven. Sometimes it involves things that they do - "I give to charity, I go to church, I'm nice to animals." Sometimes it involves things that they don't do - "I don't drink, smoke or chew, nor date girls that do!"
Here, Christ gets to the crux of what "work" matters most to God and that "work" is faith in Jesus. "This is the work of God, that you believe in Him whom He has sent."
Friends, it is not what you DO that will lead you to heaven for your most righteous deeds are but filthy rags (Isaiah 64:6) and will not fit you for heaven but will doom you to hell (James 2:10, Romans 3:23, Romans 6:23). It is not what you do, it is in Whom you believe (John 3:16, John 14:6).
And just in case you find yourself thinking - "Hey, I can DO that!" Let me remind you (and myself) that even our faith in these things is grace! "For by grace you have been saved through faith: and that [faith] not of yourselves, it is the free gift of God; not as a result of works, that no one should boast." - Ephesians 2:8