Gareth Bale played a lobbed pass over the opposing defense and Ramsey chested it down before knocking it past onrushing Turkey goalkeeper Ugurcan Çakir in the 42nd minute.
Bale had a chance to make it 2-0 in Baku but he missed from the penalty spot in the 61st minute. Connor Roberts added the second in the final moments of the game.
Wales has four points in Group A from its first two games while Turkey has zero after losing both of its matches.
Turkey had strong support from traveling fans and many locals in close ally Azerbaijan. The presidents of both Turkey and Azerbaijan were in attendance.