We show that if the Gabor system {g(x−t)e2πisx}, t∈T, s∈S, is an orthonormal basis in L2(R) and if the window function g is compactly supported, then both the time shift set T and the frequency shift set S must be periodic. To prove this we establish a necessary functional tiling type condition for Gabor orthonormal bases which may be of independent interest.