Gomez struck four times, alongside a brace by Arjen Robben and a further strike by Thomas Muller to quickly wipe out the visitors' 1-0 first-leg advantage and send the Bavarian giants into the quarter-finals, on the back of the biggest-ever margin of victory in a Champions League knockout clash.
Bayern came flying out of the gates, and needed only 11 minutes to bring the tie level on aggregate. Robben had already seen two chances go begging in the opening exchanges, but made no mistake at the third time of asking, latching on to Muller’s deflected shot to finish from close range.
The hosts stormed down the field immediately after the restart, but Yann Sommer was on hand to twice deny Gomez, first blocking his cheeky close range backheel, then getting down well to parry his shot at the near post.
The Basel keeper’s heroics in the first-leg had kept his side in the tie and it was proving to be the same story again, as he was called into action once more to deny Muller from a corner with a diving save just after 20 minutes.
However, Bayern were given a scare five minutes before half time after a rare attack by the visitors saw Alexander Frei volley a long cross by namesake Fabian just over from close range.
It proved to be nothing more than an aberration, and the home side doubled their advantage a few minutes later when Ribery’s ball from the right was volleyed home with precision by Muller at the near post.
There was still time before the break for Bayern to add a third, after Holger Badstuber’s cutback from Toni Kroos’ free-kick fell right into Gomez’s path a yard or two from goal.
If Basel were hoping to make a recovery in the second half, their hopes were quickly dashed five minutes after the restart by Gomez, who showed superb athleticism to sidefoot Franck Ribery’s cross home on the volley.
Gomez completed his hat-trick on the hour mark after another brilliant piece of play on the left flank by Ribery, whose jinking run past Markus Steinhofer and teasing cross left the German striker with a simple header from inside the six yard area.
The Ribery-Gomez combination came up trumps once again in the 67th minute, the former again beating Steinhofer with ease before cutting back towards the latter, who finished into the top corner with aplomb.
Robben got the seventh nine minutes before the end, picking up substitute Bastian Schweinsteiger’s pass to round Sommer and complete a perfect evening for Bayern at the Allianz Arena.
After this performance, the Bavarian giants head into the last eight on a high and look a daunting prospect for any side in the quarter-final draw, which takes place on March 16.