She tasted the cake to check whether the sweetness was right.

Literal

She [topic-は] sweetness-level [subject-が] good [whether-or-not-かどうか] cake [possessive-の] taste-check [object-を] did.

Three pieces of grammar interlock. 甘さ加減 stacks 甘さ (the い-adjective 甘い turned into a noun 'sweetness' via ~さ) + ~加減 (a productive suffix meaning 'level / degree / extent' that captures 'how much-ness' — 力加減 'amount of force,' 湯加減 'water temperature in a bath'). ~かどうか is the 'whether or not' embedded question marker, attached to the predicate 良い. 味見をする ('do a taste-check') is the noun-plus-suru pattern for the deliberate act of sampling. Cooking and baking are full of 加減 vocabulary because so much of Japanese cuisine is calibration: 火加減 'heat level,' 塩加減 'saltiness,' 焼き加減 'doneness.'