Preheat the broiler to high.
Using a paring knife, make slits all over the brisket and stuff with garlic cloves. Place the brisket in a baking dish or casserole and broil until browned on top, about 10 minutes. Remove the baking dish from the oven, turn the brisket, and return the dish to the oven until the brisket is browned on the other side, about 10 more minutes. Reduce the oven temperature to 350?F. Add enough beef stock to the casserole to come up 1 inch on the sides, cover with foil, and bake 1 hour.
While the brisket is cooking, heat the oil in a large skillet over medium-high heat. Add the onions and cook, stirring occasionally, until caramelized and most of the liquid has evaporated, about 20 minutes; reserve.
Add the remaining ingredients to a small bowl and stir to combine; reserve.
Remove the baking dish from the oven after 1 hour and arrange most of the onions on top of the brisket and the rest around it. Pour the ketchup mixture over and around the brisket. Cover and continue to cook until the meat is very tender but not falling apart, about 3 more hours. Remove the brisket to a carving board and slice. Serve the sliced brisket with the pan juices alongside. (The brisket is better if made a day in advance; simply reheat covered in a low oven.)
Makes about 8 servings