Let B be a generalized Koszul algebra over a finite dimensional algebra S. We construct a bimodule Koszul resolution of B when the projective dimension of S B equals two. Using this we prove a Poincaré-Birkhoff-Witt (PBW) type theorem for a deformation of a generalized Koszul algebra. When the projective dimension of S B is greater than two, we construct bimodule Koszul resolutions for generalized smash product algebras obtained from braidings between finite dimensional algebras and Koszul algebras, and then prove the PBW type theorem. The results obtained can be applied to standard Koszul Artin-Schelter Gorenstein algebras in the sense of Minamoto and Mori (Adv Math 226:4061-4095, 2011).