No sailing ship can sail directly into the wind. However by rigging the sails correctly the vessel can be made to sail more closely to the wind.
ships could sail against the wind.
No, by properly trimming the sails, it is possible to sail within approximately 45 degrees of the wind's oncoming direction.
Diane Beeston has written: 'Of wind, fog and sail' -- subject- s -: Photography of sailing ships
a boat a sail and the wind
they took advantage of innovations in sailing technolgy that allowed ships such as the caravel to sail against the wind.
Wut made ships sail in the wind was that using a persicet sail or flag will pick up the wind and will push the air out and sail..just like u swinging on a swing 
A boat can sail into the wind by sailing backwards and forwards (tacking) at an angle to the wind and so making her way up.
It is not possible to sail directly INTO the wind. Forty-five degrees is about as close as can be gained. Actually they did get the ships to sail into the wind. The above answer is wrong.
Vasco Da Gama's ship was powered by the wind, it was a sailing boat.
To sail against the wind, a boat has to 'tack'. This means that instead of sailing straight into the wind (which would get you nowhere) you sail in a zig-zag in the direction you intend to go. On each tack, the wind is on a different side of the sail.
A sailing boat can not sail directly upwind, sail at about 45 degrees to the wind and tack (turn the boat through the wind) to the other side of the wind and continue in this zig-zag manner up wind.