There are at least two possible ways to understand what He means. The first is that God is always working to produce faith in His people so they can properly use their free moral agency. The second, however, is the primary meaning because they ask what they had to do. Jesus replies that godly work for the individual is believing in or on Him as Messiah.
In other words, as Jesus uses it, faith is itself a work. Labor is involved in faith because living faith requires activity to meet the definition given in James 2. As the apostle says, faith without works is dead, and such "faith" is in realty not even faith. Some, especially evangelical Protestants, object to this because they feel it creates a "works" salvation.
Their objections, though, are so much sound and fury without biblical substance. Jesus says at least a dozen times in different ways that salvation is by grace. Biblically, merely believing or agreeing with God or some biblical doctrine is of itself no better than being dead. Dead things produce nothing because nothing is working to produce anything. This is why Paul in Hebrews 3 can use "unbelief" and "disobedience" interchangeably. In other words, if a person only agrees, he merely has a preference, and his works will be at best inconsistent and sporadic. If a person has living faith, however, his belief will be a conviction, and works will occur.