Mikel Shishay was stopped by police in Eastville Park on 26 June this year after the exchange was observed by officers.
DNA obtained from the drugs matched that of Shishay and last month he was charged with two counts of supplying class A drugs.
The 26-year-old pleaded guilty to both offences and at Bristol Crown Court and was jailed for three years and four months.
Shishay, of no fixed address, was arrested by officers working as part of Operation Remedy, who focus on crimes including drug-related offences.
PC Owen Holmes, from the Operation Remedy team, said: “Drug dealing can often lead to other crimes and cause untold misery within the community.
“Mikel Shishay has a long history of drug dealing and it’s pleasing to see our proactive policing strategy rid Bristol’s streets of another criminal.
“We welcome the custodial sentence handed out to him and hope it acts as a warning to people who wrongly think it’s acceptable to sell illegal drugs.”