Preheat oven to 350°.
Rub the sides and the bottom of an 11 x 7-inch baking dish coated with cooking spray with garlic halves. Crush garlic halves; set aside.
Cut celeriac into 1/4-inch-thick slices; cut slices into quarters to measure 2 cups, reserving remaining celeriac for another use. Place 2 cups celeriac, potatoes, and 3 thyme sprigs in a large saucepan, and cover with water; bring to a boil. Reduce heat, and simmer 10 minutes or until potatoes are tender; drain and discard thyme.
While the potatoes are cooking, combine flour, salt, and pepper in a small saucepan; gradually add milk, stirring with a whisk. Stir in crushed garlic and 1 thyme sprig. Place the pan over medium heat, and cook until thick (about 10 minutes), stirring constantly with a whisk. Remove from heat; stir in 3/4 cup cheese.
Arrange potatoes and celeriac in baking dish; pour sauce over vegetables. Sprinkle with 1/4 cup cheese. Bake at 350° for 30 minutes or until lightly browned. Discard thyme.