Was there ever at any point in time a volcano in the great barrier reef? I thought atolls develop from volcanic islands, and the coral grow around them.
Australia's Institute of Marine Science webpage How the Great Barrier Reef was formed is the result of the flooding of the former coastal plain when sea levels were lower. A further explanation from the website states:
The coastal plain included river valleys and small and large hills. Corals tended to grow best on hills because they were where waves broke and the water was most turbulent. Thus, although corals probably grew on any available hard shallow surface on the flooding coastal plain, reefs tended to form where there were hills.
A diagram of the formation is shown below:
So, not the result of volcanoes, but rather the after effects of coastal plain inundation.
Coral reefs will grow on any suitable substrate given the basic requirements of sunlight, temperature (optimally 23 to 29 deg C), nutrient availability, and turbidity from waves or current flow. In the deep ocean these conditions are almost invariably found on volcanic seamounts - hence your original perception. But as Ghost points out, there are no volcanoes in, near or under the Great Barrier Reef. In fact the nearest recent volcanism in Australia is in Western Victoria, nearly 2000 km from the GBR.