This is normally but not always an iDevice issue. If you take a photo with the phone in the "portrait" position, the photo is actually taken as landscape so it appears the wrong way round when attached in its raw form to something like a forum, or in GMail.

Looking at the exif data in the affected photos from iPhones, there seems to be a contradiction in the exif data. One spot says "Landscape" even when the photo was taken in portrait mode, another spot is coded to indicate that the photo should be rotated for display, apparently trying to indicate that the photo isn't REALLY landscape, even though it SAYS it is. It sometimes causes the iPhotos to display upside down, too.