They were always close...
Well to start with, she and Barton were clearly close during Avengers 1, moreso than you seem to imply. It's true that she feels indebted to him, but they also act with quite a bit of tenderness after Barton sheds Loki's influence. They're clearly more than business partners, they're friends, or at least close companions.
That being said, you're right, Widow's side of the interaction seems substantially warmer during Age of Ultron than in the previous film.
...but Winter Soldier changed her attitude about friendship.
Black Widow's arc during the events of Captain America: The Winter Soldier revolved largely around her trust issues, and her unwillingness to believe that her teammates genuinely trust her. She opens up quite a bit to Rogers about her doubts, even her lack of self-awareness around her own nature and trustworthiness.
In that film, we see her toy with the idea that she might actually be able to have friends, not just brothers-in-arms. Then, when we pick up with her in Age of Ultron, she is pursuing a romantic relationship and acting much more warmly with Barton.
This isn't a coincidence.
It's never explicitly stated, but it's a reasonable assumption that Romanov continued her emotional exploration of friendship and trust between Winter Soldier and Age of Ultron, testing the waters of being less stand-off-ish with her squadmates and flirting (for real) with a cute guy on her team. We know that Cap was encouraging her in that effort (from their conversations in Winter Soldier and his bar-side chat with Banner in Age of Ultron). And for those who dislike the Hulk/Widow romance, it actually makes a good bit more sense when you factor in this multi-film arc: Romanov isn't just suddenly thrust into a romantic storyline, she's tentatively reaching out for the first time, and she naturally connected someone who also wrestles with crippling self-doubt.
One can easily imagine that Barton, who is always laid back and jovial, welcomed these first signs of Romanov's opening up, and encouraged the shift from coworker to genuine friend during the inter-film period.