Prepare the oven and pan. Preheat the oven to 400°F (200°C). Lightly grease a 9×13-inch (23×33 cm) baking pan with butter.
Mix the wet ingredients. In a large bowl, beat the softened butter and sugar until creamy. Mix in the egg, sour cream, and vanilla until combined.
Make the dough. Whisk the flour and baking powder together, then gradually stir them into the butter mixture. Finish gently by hand until a soft dough forms. If it is too sticky to roll, add extra flour one tablespoon at a time, using only as much as needed.
Roll the bottom crust. Divide the dough into two equal portions. Roll one portion on a lightly floured surface into a rectangle that fits the bottom of the pan. Transfer it to the pan, gently press into the corners, and patch any tears. Prick lightly with a fork.
Prebake. Bake the bottom crust for 10 minutes, until it begins to set.
Prepare the filling. Combine the grated apples, sugar, and vanilla. Spread evenly over the partially baked crust.
Add the top crust. Roll the remaining dough into a rectangle and carefully place it over the apples. Gently patch any tears, then prick the surface lightly with a fork.
Bake. Return the pan to the oven and bake for approximately 30 minutes, until the top is lightly golden brown.
Cool and serve. Let the bars cool in the pan before slicing. Dust with powdered sugar and cut into 18 bars.