Charlie Fry, 25, was at a beach north of Sydney on Monday when the shark “jumped out of the water and hit him in the right shoulder”, police said.
Dr Fry said he punched the shark while in the water before climbing back on his board and surfing to shore.
He said he had been inspired by surfer Mick Fanning, who famously fended off a shark during a competition in 2015.
The shark left scratches and a small puncture wound on Dr Fry’s arm. Police said the animal was about 2m (6.5ft) long.
“I saw this shark come out of the water and breach its head and I punched it in the face with my left hand,” Dr Fry told local Nine Network’s Today programme on Tuesday.
“When it happened, I was like, ‘just do what Mick did, just punch it in the nose,'” he said.
He described the contact as “a massive thud on my right-hand side, which completely blindsided me”.
He said he feared for his life during the incident, which happened near shore at Avoca Beach.
Dr Fry received treatment in hospital and has since been discharged.