The Indian, who skipped Asian Games to salvage his season, fought past the Chinese 6-3 4-6 6-4 in two hours and seven minutes in the opening round of the hard court event.
Somdev, world number 141, has played second seed Murray once when he lost to the Scottish world number 11 in the first round of the 2011 US Open.
Somdev broke Gao four times and lost his serve thrice in the gruelling match.