Gomez has scored 11 times in the Champions League this season, once fewer than Messi, plus 23 Bundesliga goals for title-chasing Bayern.
The media in Germany have repeatedly compared the two players but Gomez shrugged off the suggestion ahead of Tuesday's Champions League quarter-final second leg against Olympique Marseille.
"I am not crazy enough to compare myself with Messi because he is the best there ever was and the best there will ever be," he told reporters on Monday.
Last month triple World Player of the Year Messi broke Barcelona's scoring record with his 234th goal for the club and his tally of 56 goals this season in all competitions is already a Spanish record with more than a month and a half still to go.
His next goal will be his 50th in the Champions League, a tally only reached by Spain's Raul, Dutchman Ruud van Nistelrooy and Thierry Henry of France.
It would also give Messi 13 in a season, a Champions League record.
"I guess there are worse things than being compared to Messi but I don't look at what he is doing. I just try to give my best for my team," said Gomez.
"The team make it easy for me. We play offensive football and I have great team mates.
"I am a forward and want to score many goals but for me that is not important. What is important is to be successful with the team," added Gomez.
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.