It is the difference between TMS and XYZ/WMTS addressing of the same mercator tile.
See the detailed description and mashup I made at:
http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
GDAL2Tiles renders always TMS.
The scripts and equations for conversion of the flipped y-coordinate are mentioned in the MapTiler User Group on Google Groups.
If you render the map tiles with the new MapTiler (http://www.maptiler.com/) you can choose whether you want TMS or XYZ/WMTS addressing of the tiles. This option is available under the "Advanced options" button.