Fez

The Fez is the titular hat that grants Gomezhis ability to percieve and adventure throughout the third dimension. It is gifted to him by the Hexahedron.