The formation mechanism of the ohmic Au/Ni//p-GaN contact has been investigated. We found that it is essential to (i) deposit a structure of Au and Ni in the proper deposition sequence, and (ii) anneal the bilayer structure in an oxygen containing ambient. Our findings indicated that oxygen assists the layer-reversal reactions of the metallized layers to form a structure of NiO/Au/p-GaN. The presence of oxygen during annealing appears to increase the conductivity of the p-GaN. It is further suggested that Ni removes or reduces the surface contamination of the GaN sample before or during layer reversal. In the final contact structure, an Au layer, which has a large work function, is in contact with the p-GaN substrate. The presence of Au in the entire contacting layer improves the conductivity of the contact. An ohmic formation mechanism based on our experimental results is proposed and discussed in this work.