Google explicitly endorses this. As long as clicking a link from Google gets you to what the Googlebot saw, it's OK to put a paywall up for everyone else. It maintains Google's SERP reliability and allows publishers to make money on content, so Google views this as a good arrangement. https://support.google.com/webmasters/answer/74536?hl=en
(Lest you think this is completely evil and self-serving, remember that the alternative is banning paywalls altogether — which means the sites would be forced to rely on ads, which would be even more in Google's interest as the biggest player in the ad game. So I think this might be what Google being selfless looks like.)