Not necessarily. If the course was certified according to ASA standards and the start and finish were placed in the correct locations, then you can be sure that the distance is correct. If the course isn't certified, of course, then it may very well be the wrong length.
But, you ask, the course was certified and my GPS still says I ran two tenths of a kilometer too long. There are two main reasons for this.
First of all, to certify a course the measurer must carefully ride the "tangents," or the shortest distance between two points, weaving back and forth from one side of the road to the other to follow the straightest line possible. Unless you also run the course that way you're going to run further.
The second reason is that tall buildings and tree cover can interfere with satellite signals, throwing off the accuracy of your GPS. For a great explanation of all this, read what Boston Marathon Race Director Dave MacGillivray has to say here. If you want even more detail, download this excellent article describing the whole issue.