Grease a small baking dish or quarter sheet pan with butter and dust all over with flour, shaking off any excess flour.
Set rack in the middle of the oven and preheat at 400°F.
Place the grated potatoes in a strainer and press out as much moisture as you can — repeat a couple times until almost dry. In a medium bowl, mix the strained potatoes, onion, flour, eggs, salt, pepper, and baking powder very well.
Press the potato mixture into the prepared baking dish. Brush olive oil generously over the top.
Place in the oven and bake until completely cooked and golden brown on top and bottom, about 40 to 45 minutes.