We often expect God to take some action on our part during a difficult time in order to help us out. God instead wants us to realize that His presence is all that we need. In Haggai's time the Israelites had lost the confidence to embark on rebuilding the temple. Today we face the doubts of an uncertain world. In both situations, God is with us, and just realizing that He is there with us should give us the confidence to get over any obstacle we face.
It had been 15 years since they had returned to Jerusalem and rebuilt the wall under Nehemiah's leadership. They were suffering because they had not followed God's instruction to also rebuild the temple. Much like our current situation in the world today, they were too concerned with pleasing themselves and those around them instead of putting their faith where it belongs... in God who had seen them through so many other trials.