I have gravel, quite chunky gravel at that, so I just have a nice layer along the bottom, I'm not too fussed if it isn't 2 inches deep exactly. I quite like having gravel because Lucky enjoys foraging through it during the day, but I have heard of people having bare bottom tanks with goldfish, so I wouldn't say it's necessary, more an option, both have their pro's and con's.
Gravel as Nabi pointed out, is also a place where some of the nitrifying bacteria live
