Although it is often asserted that the moon "controls" the tides, this is really an oversimplification of the tidal system. In fact there are many factors which determine the tides, including the moon, the sun, the rotation of the earth, the geomorphology of the ocean basin, and the location of the particular spot where you're measuring the tide along that basin. All of these factors interact in a complex way to determine the specifics of the tide's characteristics at each location on Earth.
However, it is true that the basic global phenomenon of tides (ignoring local particulars and peculiarities) can be explained as a consequence of rotation and gravity, with the moon being the factor that tips the rotation/gravity system into on