The Welshman nodded in Olivier Giroud's header across goal on 62 minutes for the Gunners' third victory in the group stage to take them back to the top of Group F on nine points.
Dortmund came into the encounter searching for an eighth successive home Champions League win and had never lost against English opposition.
Mesut Özil and Ramsey celebrate the Welshman's winner
However they faced a resilient and disciplined Arsenal, who took the lead with their first effort on goal and went on to play their best football of the contest in the final half-hour.
With Napoli beating Marseille, Arsenal still have work to do to secure safe passage through to the knockout stages, but Arsène Wenger's side will have gained an immense amount of belief following their Wednesday night success.