The result concluded a five-game winning streak that allowed the Catalan club to finish one point ahead of Real Madrid, which had 90 points from 38 games.
Madrid defeated Deportivo 2-0 in La Coruna with two goals by Cristiano Ronaldo, but it needed Barcelona to stumble to clinch its first title since 2012.
After the final whistle in Granada, Barcelona players formed a circle near the benches and jumped up and down while chanting “Campeones, Campeones.”
Hundreds of fans from both teams invaded the pitch as players struggled to find their way off the pitch.
Barcelona, which finished with 91 points, has won six of the last eight Spanish league titles, and eight of the last 12. It has 24 trophies in total, eight less than Real Madrid, the league’s most successful club.
Saturday’s win helped Barcelona avoid what would have been a disastrous title loss after it led Madrid by 12 points with nine rounds to go.
The title is a deserved consolation for the club that crashed out of the Champions League in the quarter-final, losing to Atletico Madrid.