Supported gold nanoparticles are promising catalysts for production of H2O2 from O2 and H2. Size, structure, and palladium doping effects play the key role in activity and selectivity of a gold catalyst. We performed a study of the influence of Au20 and Au19Pd structure features on the main steps of H2O2 formation on the atomic level, using the DFT/PBE approach with relativistic all electron basis set. The top, edge, and facet atoms of the tetrahedral Au20 cluster as well as a palladium atom of Au19Pd located on the top, edge, and facet of a tetrahedron have been considered as active sites of steps involved in H2O2 synthesis. The thermodynamic and kinetic data including Gibbs free energies and the activation Gibbs free energies were calculated for the steps determining the formation of H2O2 (H(s) + OOH(s) = H2O(2(s)), H2O(2(s)) = H2O(2(g))) and for one step decreasing the selectivity (H2O(2(s)) = OH(s) + OH(s)). Gold tends to have low activity and high selectivity in H2O2 synthesis regardless of the structure of active site. Low coordinated palladium atoms promote H2O2 formation as well as its dissociation. Pd on a facet of a cluster facilitates H2O2 production with high activity and selectivity.