First, a point of terminology: a contour plot is a plot showing isolines (also called isocontours) of a scalar function of two variables. So you're asking how not to make a contour plot, but rather a colour map (or heat map). Then there's the issue of how your data is presented and gridded. You are right that the matrix
format of gnuplot is only appropriate for data on a regular grid.
If your datafile defines polygon corners in x,y,z coordinates, I would:
set view map set pm3d interpolate 10,10 corners2color mean splot "res.gdat" notitle with pm3d