Adam Gilchrist smashed 149 and shared a partnership of 238 with Justin Langer to give Australia a memorable win against Pakistan in Hobart.