Boundary domain genes, expressed within or around organ primordia, play a key role in the formation, shaping, and subdivision of planar plant organs, such as leaves. However, the role of boundary genes in formation of more elaborate 3D structures, which also derive from organ primordia, remains unclear. Here we analyze the role of the boundary domain gene CUPULIFORMIS (CUP) in formation of the ornate Antirrhinum flower shape. We show that CUP expression becomes cleared from boundary subdomains between petal primordia, most likely contributing to formation of congenitally fused petals (sympetally) and modulation of growth at sinuses. At later stages, CUP is activated by dorsoventral genes in an intermediary region of the corolla. In contrast to its role at organ boundaries, intermediary CUP activity leads to growth promotion rather than repression and formation of the palate, lip, and characteristic folds of the closed Antirrhinum flower. Intermediary expression of CUP homologs is also observed in related sympetalous species, Linaria and Mimulus, suggesting that changes in boundary gene activity have played a key role in the development and evolution of diverse 3D plant shapes.