The allusion you refer to comes in the final chapter of Book II in this excellent novel, where Mr Gradgrind is presented as working in his study, writing some kind of report. Note what the text says about him:
He sat writing in the room with the deadly-statistical clock, proving something no doubt--probably, in the main, that the Good Samaritan was a Bad Economist.
The allusion here is to a parable that Jesus told in The Gospel of Luke, Chapter 10, where a Samaritan gives money to help a man who is set upon by robbers and left for dead. The Samaritan cares for this stranger, who also, as an Israelite, is the racial enemy of his people. This allusion is used by Dickens to further our understanding of Mr. Gradgrind and his philosophy on life. To him, it was sheer idiocy that the Samaritan should give his own money to help somebody who was not just a stranger to him, but also a national enemy. This is because Mr. Gradgrind is uncapable (at this stage of the novel) of understanding the Christian principles of love, self-sacrifice and giving from your own riches to help another person. These characteristics make no sense to him, as they belong to the realm of "fancy" and not the hard, statistical world of facts where he dwells. The allusion therefore operates as yet another reminder of the philosophy of Mr. Gradgrind and how those around him suffer as a result.