It depends how heavy this piece you want to glue is. Paint doesn't hold all glues that well, as you noticed.
To get a better grip, you may want to sand down the areas on the door that will have the glue adhere to.
I would use wood glue, good ol' Elmer's.
I would take the door OFF the hinges though, and lay it flat somewhere. THEN glue the piece on so it sits on top of the door overnight. Then rehang the door.