They are two different dishes. They are often thought of as "the" traditional English dinner. In the United States, where I live, "roast beef" is a very common dinner entrée, but "Yorkshire pudding" is not.
"Pudding" is a word whose meaning is different in the U.K. and the U.S. The best way I can describe it is that in the U.S. "pudding" normally means something you could not possibly eat with a fork; it usually a thick near-liquid like yogurt or oatmeal. In the UK it seems to be a wide range of cake-like foods that are "moist" but not liquid.