This study proposes a new car-following (CF) model to capture the effects of road geometry characteristics on traffic flow behavior. In particular, an extended CF model is proposed incorporating the effects of both lateral gap and gradient. Stability of the proposed model is analyzed using the perturbation method to obtain the stability condition. Numerical experiments are performed for comparisons among the full velocity difference (FVD) model, two-sided lateral gaps based full velocity difference (TSFVD) model, and the proposed model. Results from numerical experiments demonstrate that, with the increase of the slope, the stability region of the proposed model will be enlarged in uphill scenario, while it will be reduced in downhill scenario, respectively. Also, the proposed model is effective to rapidly dissipate the effect of a perturbation such as a sudden acceleration or deceleration from the lead vehicle. In addition, the CF behavior of traffic flow can be characterized by the proposed model in terms of the space headway profile in uphill and downhill scenarios. That is, with the increase of the slope, the average space headway of the traffic flow will be decreased in uphill scenario, while it will be increased in downhill scenario, respectively. These findings can be generalized to the scenario of traffic system with gradient and lateral gap.