CoinGecko calculates a volume-weighted average price by taking data from all major cryptocurrency exchanges and cryptocurrency pairs worldwide.
For example, you may see the data source for Ethereum on the Trading Exchanges tab. Here is the direct link: 

Some cryptocurrency prices are being driven up by large trading volume by exchanges in certain geographical region trading them at a large premium from other countries, or by decentralized exchanges. This may explain why you may see a difference between our volume-weighted average price as compared to US exchanges.

For detailed explanation, do read our methodology page here: