Yes, polls were the source. But the polls weren't completely off. The actual results were within the margin of error of at least most polls. Also, there were several polls that predicted Trump winning. The polls also did predict to a degree the regional difference, so in all likelihood, to a degree, they are right on the generation difference, and other ones as well, but of course, with some margin of error.
The exit polls are probably more accurate than the pre-election polls since they better take into account voter activity and last minute change of heart etc. However, they of course have their weaknesses as well (for example, some groups might be less likely to reveal their vote, and they don't take early voting into account). All this said, I think there's still pretty well reason to believe the generation difference really is greater than the regional difference.
Completely different thing is the voting activity. It could have shifted the results completely if the voting activity was similar in all of the groups. For example, the younger the people, the less likely they were to vote.