It is a real song, with a backstory almost as sweet as the film.
To take his mind off his injury, Julia Roberts sings to her stepson while he's in the hospital. The song is "If I Needed You," originally written by country legend Townes Van Zandt. However in 1998, the same year "Stepmom" was released, country singer Lyle Lovett did the song on his "Step Inside This House" album.
Lovett and Roberts were married briefly, from 1993 to 1995. Both major stars at the time, they worked hard to keep the details of their marriage private. But as the story goes they split in 1995 because the demands of their careers were keeping them apart, and have reportedly remained friends.
Given that fact, and the fact that both the movie and album were being made less than two years after their split, the song, a sad one about two separated lovers being able to reunite if they need each other, becomes downright poignant.
Roberts and Lovett met on the set of the 1992 film-biz-themed comedy "The Player" (the first of Lovett's few acting roles) and married the next year, eloping in a small Indiana city while Lovett's band was touring through.