Media playback is not supported on this device
England claimed silver and bronze in the final through Max Whitlock and Louis Smith. Scotland's Daniel Purvis finished in fifth place.
Keatings's gold follows his two silver medals, in the men's all-round finals and the men's team event.
And it takes to 14 the number of gold medals won by Scotland since the Games got under way.
Keatings, 24, produced a stunning routine in front of his home crowd to score 16.058 and see off the challenge of Whitlock.
"It was amazing to be in front of a home crowd and do probably one of my best routines," he said afterwards. "I went for a 7.2 start and hit it. I'm ecstatic to have won."
BBC Sport's gymnastics expert Beth Tweddle said: "It feels right that, in front of a home crowd, Dan Keatings produces that.
"It's a massive achievement for Dan because this wasn't just any old final, this was the one they all wanted."
Meanwhile, Purvis secured a bronze medal in the men's ring final.
The event saw Canada earn their first gold medal in the gymnastics courtesy of Scott Morgan, with compatriot Kevin Lytwyn taking silver.
Scotland's Daniel Keatings has won gold in the men's pommel horse at the Glasgow 2014 Commonwealth Games.