The defender sealed a move to the Reds from Charlton Athletic in June 2015 having just recently celebrated his 18th birthday.
He told the club's website: "It's had its ups and downs and some periods have gone quicker than others, but I am so grateful to be at this club and to be coming up to my fifth year is something I definitely appreciate.
“Hopefully it is just the start of the journey; five years is a pretty decent length of time, but I hope it is just sort of the opening chapters of what can be many more years here.
“It has definitely been special times and I have definitely grown a lot here. I've done most of my growing up as an adult, coming here at 18. I've learned so much about the club and about the city. It's been a pleasure."
Asked if his time at Anfield had lived up to expectations so far, Gomez added: “Everything and more. I've said it a few times but I don't think I realised the stature of the club when I was signing.
“To be a part of some of the memories that have been created here already over the past five years and just being a part of the city and the club is special. It's become home, my son was born here and I am getting to raise a family.
“To be a part of such a special club, for me the best in the world in the sense of the community, the fanbase – for that, I've got to give thanks.
“Coming back in [when training at Melwood resumed] really gave perspective of how much of a blessing it is to be a part of this club and to be involved in the set-up there is something to be thankful for."