Gary Illyes from Google said on Twitter that Google ranks Wikipedia just like it ranks any other web site on the internet. In short, he is saying that Wikipedia doesn't get any special ranking boost just for being Wikipedia - they don't get special treatment.
Here is the tweet:
@TimothyTurner13 @JohnMu Wikipedia is ranked just like any other website.
— Gary Illyes ᕕ( ᐛ )ᕗ (@methode) December 16, 2016
Gary also said a few months ago that Wikipedia does a good job at getting links to internal pages - which makes a lot of sense.
So yes, Wikipedia ranks well for a lot of queries but not because Google is in bed with them.
Forum discussion at Twitter.