There Is Gravity in Space
Newton's law of gravity states that the gravitational force between any two objects in the universe is proportional to the mass of the objects and inversely proportional to the square of the distance (measured from their centers) between them. So if the distance between two objects doubles, the force between them is one fourth as much. But for the force to be exactly zero an object must be at an infinite distance. Hence there is a gravitational force everywhere in the universe from every mass in the universe. This force is negligible for distant objects but not zero.
Shuttle astronauts are orbiting only a few hundred miles above Earth's surface. This increases the astronauts distance from the Earth's center a few hundred miles out of about 4000 miles. So a 160 pound astronaut will still weigh about 140 pounds at a distance of 200 miles above Earth's surface. They are not weightless because there is less gravity up there.
Simple Free Fall Experiment
Poke a hole into the bottom of a paper cup. Covering the hole with your finger, fill it with water. Now hold it above your head and remove your finger. Water will drip out the hole. Drop the cup and watch it fall. While it is falling freely, the water does not drip out. Objects in free fall are weightless.
You may notice a light feeling when a high speed elevator in a tall building begins its descent. It is the same effect, but you are not completely weightless. While the elevator is accelerating downward, it is not falling freely. We hope! Amusement parks often have rides that give riders a brief interval of free fall and the corresponding weightlessness.
Orbiting Earth
When astronauts are in orbit, Earth's gravity provides a centripetal force that continually changes the direction of their velocity. The resulting motion is a nearly circular Earth orbit. This orbit is under the influence of no other significant forces but Earth's gravity, so they are freely falling around the Earth.
Orbiting astronauts are in free fall. Hence they are weightless.
NASA trains astronauts for weightlessness by flying them to a high altitude in an aircraft, dubbed the vomit comet, and then allowing the plane to fall freely towards Earth. Just before it crashes, the pilot pulls the plane out of free fall. Again they are weightless because they are in free fall.
Why Are Objects in Free Fall Weightless?
When sitting in a rapidly accelerating car, you feel pushed back into the seat. No one is shoving you in the chest. You feel this apparent force because your reference frame, the car, is accelerating. For the same reason people not wearing seatbelts will fly through the windshield if the car crashes and stops suddenly. These apparent forces caused by accelerating reference frames, cars or anything else, are called inertial forces, They result from the object's inertia, the tendency to keep their same velocity.
When an object falls freely, gravity accelerates it downward. Because it accelerates downward it experiences an upward inertial force. This upward inertial force exactly cancels the downward gravitational force. Hence the freely falling object is weightless.
The inertial force exactly equals the gravitational force because of the principle of equivalence, which is the basis for Einstein's general theory of relativity.
Astronauts orbiting Earth are not weightless because there is no gravity in space. They are weightless because they are in free fall.