Ireland's record goalscorer took his tally to 65 inside the opening 18 minutes to avoid any build-up of pressure and become the all-time leading scorer in UEFA European Championship qualifiers with 21 goals.
Keane is the first man to claim three international hat-tricks for Ireland and his early strikes gave Martin O'Neill's men complete control of the Group D clash.
James McClean grabbed a brace and Wes Hoolahan was also on target following an own goal from Gibraltar goalkeeper Jordan Perez as the hosts pulled further clear in the early stages of the second half.
O'Neill's men are set to face a much sterner test on Tuesday, when they face world champions Germany in Gelsenkirchen, but will surely be content with the manner in which they eased to a second win from as many qualifying matches.
Ireland were missing the injured Seamus Coleman and James McCarthy but set the tone early as Aiden McGeady and McClean attacked their opposition full-backs.
The hosts had to wait just six minutes for the opening goal, Hoolahan and McGeady taking advantage of a poor clearance by Perez to tee up Keane for a tap-in from six yards.
Eight minutes later it was two, as Hoolahan chested down and volleyed a well-weighted through ball that caught out Gibraltar captain Roy Chipolina and allowed Keane to advance on goal and finish from 15 yards.
Hoolahan was again involved as Keane completed his hat-trick on 18 minutes. The Norwich man was felled by Perez, after Keane had a shot cleared off the line, and the skipper made no mistake with the resulting penalty.
With a three-goal cushion established, there was a drop in the pace and purpose of Ireland's play.
Perez was kept busy and produced a couple of smart reflex saves, including one to deny McGeady from inside the box on his left foot after 35 minutes.
However, Ireland emerged with added impetus after the break and increased their lead within a minute of the restart as neat passing put Keane in again before he squared for McClean to pass into an empty net.
Perez's afternoon got worse in the 51st minute as he deflected one of his defender's clearances off the line into his own net.
McClean claimed his second two minutes later, pouncing on a Perez parry, and it was soon seven as Hoolahan punished more dreadful, deep defending.
Perez was spared further punishment as he was substituted and his replacement, Jamie Robba, managed to avoid conceding, thanks largely to a terrific late stop that denied McGeady.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.