Here's why:
* Gerund: A gerund is a verb ending in "-ing" that functions as a noun.
* Gerund Phrase: A gerund phrase is a gerund plus any modifiers or objects that go with it.
In this case, "singing" is the gerund, and "beautiful" is the modifier. Together, they act as the object of the preposition "with."