It is both. The surroundings account for the year-to-year variation, and the talent of the QB accounts for why they vary from year-to-year at different levels of play.
Just to make it clear, consider the following hypothetical passer rating numbers:
QB X
2010: 100
2011: 95
2012: 103
2013: 98
2014: 105
2015: 97
2016: 99
QB Y
2010: 85
2011: 89
2012: 95
2013: 90
2014: 87
2015: 84
2016: 88
Both QBs vary from year-to-year, presumably as a function of what's going on around them, but one of course is varying at a much higher level than the other, which presumably is based on his superior individual talent.
QB Y has a single season in which he eclipses one of the seasons of QB X's performance (both have passer ratings of 95 in that instance), but the aggregate of their performance over the relatively large number of seasons makes one of them significantly better than the other on an individual basis.
If you take many QBs and split them into two groups, better QBs and worse ones, you find that the variation between the two groups is significantly greater than the variation within them.
What this means again is that with a sufficient sample size of seasons, there are no surroundings that can make worse QBs play as well as better ones on a long-term basis. When the better QBs have terrible surroundings and the worse QBs have terrific surroundings, they may play similarly for a season or two during their careers, but over the long haul the better QBs again are varying at a higher level than the level at which the worse QBs are varying.
This is in effect why I'm okay with Tannehill as the long-term QB of the Dolphins -- he gives them a legitimate shot, but he needs lots of talent around him. And that's especially on defense, where the performance of opposing QBs needs to be contained so as to make Tannehill more competitive against them.