The hosts' relief was short-lived, however, as Crouch finished off a brilliant counter-attacking move involving Nadir Belhadj and Traore moments later to give Portsmouth the lead.
The strike was not without controversy, though, with TV replays suggesting Crouch handled the ball in his own box at the start of the move, but official Mike Jones did not give it and the goal stood.
Still, City will have been happy enough with their first-half display and the second followed much the same pattern - the hosts dominating possession and Pompey threatening on the break.
Crouch could have made it 2-0 when he was put through by Younes Kaboul's flick-on from James's punt but he fluffed it wide with just the keeper to beat, while at the other end Johnson twice had to provide saving tackles to deny first Elliott and then Maynard.
It was all set up for a grandstand finish but, aside from a Maynard turn and shot that was well saved and a Lee Johnson header wide, City could not make the most of an increasingly fragile Portsmouth defence.
In fact, after Belhadj had forced a cracking save from Basso with an 18-yard strike, it was the full-back who set up Pompey's second of the night, Kranjcar latching onto his square pass and poking into an open net from close range.
Frustratingly, it was then that City carved out their best chance of the night after Sol Campbell had scythed down Maynard in the box, but the striker saw his spot-kick brilliantly turned away.
It was not to be the hosts' night and Portsmouth held on for what was their first ever win over Bristol City at the 10th time of asking.
Bristol City manager Gary Johnson:
"The result is 2-0 so you can't say too much. I thought we gave it a right go and left ourselves open a bit as we tried to get the equaliser.
"But we made James make a couple of decent saves.
"(As for whether it was handball on the first goal) that's for the viewers to decide. I don't want to moan about the officials. It's a football match - those things happen.
"I have to pick them up now. We'll show them the highlights and they'll see they are very much involved."
Portsmouth boss Tony Adams:
"I'm delighted - we're in the next round and that's job done.
"We showed our quality on the counter attack tonight and also our resilience. I would have been gutted if that penalty at the end had gone in because I wanted the clean sheet.
"We have set our stall out of late to keep clean sheets and be resilient - and we were."
Bristol City: Basso, Orr, Carey, McCombe, Fontaine (Adebola 82), Skuse (McIndoe 71), Elliott, Johnson, Sproule, Styvar (John 68), Maynard.
Subs Not Used: Henderson, McAllister, Brian Wilson, Williams.
Portsmouth: James, Johnson, Distin, Campbell, Kaboul, Wilson, Nugent (Utaka 66), Armand Traore (Hreidarsson 86), Belhadj, Kranjcar, Crouch (Kanu 90).
Subs Not Used: Begovic, Pamarot, Mvuemba, Little.
Booked: Johnson, Kaboul.
Goals: Crouch 38, Kranjcar 88.
Ref: Mike Jones (Cheshire).
BBC Sport Player Rater man of the match: Portsmouth's David James 7.65 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.Player Rater