To fit the text frame to the contents, go to Object > Fitting > Fit Frame to Content.
But I understand that the issue you're having with that is that letters with descenders (such as the p in your example) are being cut off. This is because "Fit Frame to Content" takes the lower bound of the text to be the text's baseline, ignoring things like descenders.
There's no completely straightforward way around this limitation.
What I would do, as a workaround, is: (1) Select the text frame; (2) Go to Type > Create Outlines; (3) Copy the height of the rectangle that is created (because this rectangle will take descenders and suchlike into account); (4) Undo (Edit > Undo) to get back to regular text; (5) Fit the frame to the contents (Object > Fitting > Fit Frame to Content); (6) Change the height (only the height) of text frame by pasting the stored value from step (3) into the height field.
This probably is quicker to do than to describe.
This procedure could also be scripted.
HTH!
Ariel