Hewitt will now have to wait at least 12 months before winning his home Grand Slam.
After Gonzalez raced into a two-set lead in 67 minutes, the Australian battled on in the third and grabbed a crucial break to take the set 5-7.
The result means that there will be no Australians in the fourth round here for the first time since 2002.
Gonzalez will face American fifth seed James Blake for a place in the quarter-finals.
Celebrities at the Australian Open
Special: Lime time in Melbourne