ISTANBUL—Turkey’s economy grew by 4% in 2015, beating forecasts and joining the world’s best-performing emerging markets despite political turbulence and rising security threats.

Turkish gross domestic product last year rose to 1.95 trillion liras, or $720 billion at current prices, the state-statistics agency in Ankara said Thursday.

Annual...