The structure, electronic and optical properties of a piezoelectric material, Ga3PO7 were studied by first-principles calculations in the framework of density functional theory. The calculated structure is in agreement with the experimental data. Band structure reveals that Ga3PO7 has a band gap of 3.69 eV. Analysis of partial density of states and Mulliken charge population indicates existence of GaO5 and PO4 anion groups in Ga3PO7. Furthermore, its optical properties, including dielectric constant, absorption, reflectivity, refractive index, and electron loss were calculated and analysed, which show that Ga3PO7 has potential applications based on combination of its piezoelectric and optical properties.