There are four ways to unlock Gates:

1. Asking friends; tap/click on the  'Unlock' next to the gate and then 'Ask Friends'. 
Note: Three distinct friends have to accept your key requests. 
When accepted, their profile picture will show on one of the three available slots by the gate.

2. Using Stars - gates will unlock automatically after you have collected a certain number of Stars. Click/tap on the Gate and see how many Stars are needed. Stars are earned by achieving a high score on a level.

3. Buying a Key using Coins. To buy a key tap on ‘Unlock' by the gate and opt for ‘Skip’ on the next screen.

4. Waiting 5 days. The gate will unlock itself automatically after that.