We investigate two-dimensional steady Euler-Poisson system which describes the motion of compressible self-gravitating flows. The unique existence and stability of subsonic flows in a duct of finite length are obtained when prescribing the entropy at the entrance and the pressure at the exit. After introducing the stream function, the Euler-Poisson system can be decomposed into several transport equations and a second-order nonlinear elliptic system. We discover an energy estimate for the associated elliptic system which is a key ingredient to prove the unique existence and stability of subsonic flow.