Which two would that be Hope.
If you mean the 2015 General Election as one of them the result was within the standard margin of error for the final polls.
That's not what they were saying at the time, and groups like YouGov have stated that they will have to radically rethink their processes in order to get back into that acceptable statistical margin.
The other was the Israeli General Election 6 weeks earlier.
YouGov's final pre-election poll suggested Con 34, Lab 33 - actual result Con 37, Lab 31 - sounds pretty well within the +/- 3% mating of error to me.
But actually election polling is more complicated than the sorts of surveys we've been talking about here. Why, because you have to take account not just of the opinion (which party a person is likely to vote for), but also likelihood to vote. There is no equivalent filtering for 'likelihood to vote' if you are asking people whether they are a religious person, not a religious person or a convinced atheist - which was the question on the Gallup survey we've been discussing.
In Israel there is a moratorium on publishing polls in the last few days so a late swing may not be picked up.