I can't say that my Android or iOS devices were much off from my Garmin dedicated units in tracking. But my Garmins are rather older. A key is reception. My iPhone outside gets a much better grab of sats than my Garmin in my van. And sampling and smoothing matters; my iPhone sometimes does a much better job of that than at least one of my Garmins. If you're not getting reliable tracking with a smartphone, something is wrong.
Here's a rather nice comparison of devices, although a bit dated:
http://www.dcrainmaker.com/2011/06/2011-sport-device-gps-accuracy-in-depth.html (I LOVE that some people make such an effort for us!). Executive summary: all of 'em are pretty darn close.
You'll see the iPhone went on a walkabout on one of them. Which brings up a point about measurements: sometimes it's a Good Thing when errors are that bad. Outliers that are easily discovered and discarded sometimes aren't as problematic as a persistent inaccuracy. And one also has to consider precision as opposed to accuracy. For most purposes of this forum, which is vehicle travel, I'd happily sacrifice precision for battery life. Indeed, I very only only intermittently need the GPS at all, since I'm following a road. The smartphones shine in this application because they often acquire a fix and show your position, either with GPS data or on a map, more quickly than many of the dedicated units. And fitting to the map, and the map's accuracy, are also factors. And the algorithms the software uses. There's a huge difference between say Gaia and the Olympus app I use for geolocation with my camera. The latter isn't optimized for making accurate tracks; it pretty clearly sacrifices that for battery life, since one often stops for a bit while taking photos. So the track is crap, but the photo locations are much more accurate (it would be horrible for navigation).
Rob