To achieve dynamic balancing and natural walking for a bipedal robot we propose a novel force-based control framework. Given 6-dimensional pose vector representing robot's posture and attitude, desired force and moment in the task space are computed. To generate the force and moment as desired, we propose the use of virtual gravity compensation (VGC), essentially a dynamic controller that outputs joint torques. By using the VGC-based balancing controller, the robot can maintain a desired pose stably even on a tilting plate. We also propose to extend the VGC-based balancing controller to implement a walking algorithm that controls the desired pose in terms of capture point using a finite state machine. The control algorithm was tested with torque-controlled humanoid platforms developed by our group to demonstrate robust and natural gaits under various walking environments. The robot walked robustly on irregular surfaces and recovered from external pushes. The robot also exhibited natural walking motions such as pendulum-like leg swings and heel-to-toe transitions, a characteristic feature of human gait, all without explicitly designating joint angle trajectories.