Arsenal secured a crucial victory late on as substitutes Viktor Gyokeres and Max Dowman were the heroes.