The device is called personification. Personification is when one attributes human actions, ideas or emotions to non-human objects. In this line, "Desire" is depicted as old and lying down in a bed awaiting death. Now, a person can do such a thing, but an event, like aging and death, cannot. The same is true for "young affection," which is portrayed as being eager to have the old guy, desire, be bumped off so youth can take what it considers to be its rightful property, "gaping" while s/he waits.
These choral lines allude to the youthful desire of the lover's who will not be swayed by the "old people," ie, their parents (and anyone else who stands in their way.) Bah! What do those old people know? In the words of Tracey Ullman, "They don't know about us / And they've never heard of love."
In writing his tragedy Romeo and Juliet, William Shakespeare employed a device from ancient Greek theater, the chorus. The chorus in Greek plays served to narrate and comment on the action and dialogue. While a viewer new to Romeo and Juliet may not be cognizant of the play's outcome, the prologue to the play presents the performance's chorus informing the audience that they are about to be witness to a tragedy, one involving "a pair of star-cross'd lovers" committing suicide:
"Two households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean.
From forth the fatal loins of these two foes
A pair of star-cross’d lovers take their life...."
As Act II, Scene I begins, there is, again, a prologue in which the chorus summarizes the state of affairs involving the two young lovers:
"Now old desire doth in his death-bed lie,
And young affection gapes to be his heir;
That fair for which love groan’d for and would die,
With tender Juliet match’d, is now not fair."
This passage, which employs a literary device known as "personification," or the attributing to inanimate objects (in this case, a now-ended infatuation involving Romeo's obsession with Rosaline) human characteristics or actions. The line "old desire doth in his death-bed lie, and young affection gapes to be his heir" refers to the now-former obsession on the part of Romeo with Rosaline, the object of his desire in the play's opening scenes and the reason he crashes the Capulet's ball ("old desire"), and its replacement with a new obsession: Juliet ("young affection").
Personification is a very common literary device, used to describe strong winds, rolling seas, and virtually any other natural occurrence about which the author intends to lend particular significance—or to simply exaggerate for effect. In this passage from Romeo and Juliet, Shakespeare uses it to poetically describe the emotional transition that has just occurred.